Message ID | 20180730223030.10628-1-drivshin@awxrd.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | [v3] pwm: pwm-omap-dmtimer: return -EPROBE_DEFER if no dmtimer platform data | expand |
Hi, On Mon, 30 Jul 2018 18:30:30 -0400 David Rivshin <drivshin@awxrd.com> wrote: > From: David Rivshin <DRivshin@allworx.com> > > If a pwm-omap-dmtimer is probed before the dmtimer it uses, the platform > data won't be set yet. > you can of course have my Tested-by: The version without message runs without trouble in daily use here on top of 4.17.10. Did also some testing on 4.18-rc7 and I also tested this version. I personally have no strange feeling about what dev_XXX() you have. I hope not too many other developers spend time to fix this just to find out that something like this is already in review queue. Regards, Andreas
diff --git a/drivers/pwm/pwm-omap-dmtimer.c b/drivers/pwm/pwm-omap-dmtimer.c index 665da3c8fbceb..f45798679e3c0 100644 --- a/drivers/pwm/pwm-omap-dmtimer.c +++ b/drivers/pwm/pwm-omap-dmtimer.c @@ -264,8 +264,9 @@ static int pwm_omap_dmtimer_probe(struct platform_device *pdev) timer_pdata = dev_get_platdata(&timer_pdev->dev); if (!timer_pdata) { - dev_err(&pdev->dev, "dmtimer pdata structure NULL\n"); - ret = -EINVAL; + dev_dbg(&pdev->dev, + "dmtimer pdata structure NULL, deferring probe\n"); + ret = -EPROBE_DEFER; goto put; }