Patchwork [2/3] pwm-imx: set chip.dev to prevent probe failure

login
register
mail settings
Submitter Eric Benard
Date April 29, 2012, 3:28 p.m.
Message ID <1335713330-6488-2-git-send-email-eric@eukrea.com>
Download mbox | patch
Permalink /patch/155745/
State New
Headers show

Comments

Eric Benard - April 29, 2012, 3:28 p.m.
else pwmchip_add fails

Signed-off-by: Eric Bénard <eric@eukrea.com>
---
 drivers/pwm/pwm-imx.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)
Thierry Reding - April 29, 2012, 5:07 p.m.
* Eric Bénard wrote:
> else pwmchip_add fails
> 
> Signed-off-by: Eric Bénard <eric@eukrea.com>

Are you okay with me folding your patch into the i.MX patch in the existing
series?

Thierry

Patch

diff --git a/drivers/pwm/pwm-imx.c b/drivers/pwm/pwm-imx.c
index ef9c51b..d69275f 100644
--- a/drivers/pwm/pwm-imx.c
+++ b/drivers/pwm/pwm-imx.c
@@ -175,6 +175,7 @@  static int __devinit imx_pwm_probe(struct platform_device *pdev)
 	imx->chip.ops = &imx_pwm_ops;
 	imx->chip.base = -1;
 	imx->chip.npwm = 1;
+	imx->chip.dev = &pdev->dev;
 
 	imx->clk_enabled = 0;