diff options
author | David Rivshin <[email protected]> | 2018-08-01 10:17:29 -0400 |
---|---|---|
committer | Thierry Reding <[email protected]> | 2018-08-20 11:32:19 +0200 |
commit | 43725feb593127b16318b871e3a9bf89a96d66cb (patch) | |
tree | f7144bb47d67ebb3c3914c59c60cf6a6364f2bc2 | |
parent | 19ad2b75c6436eb7a5233a68cca13ceb17041ec8 (diff) |
pwm: omap-dmtimer: Return -EPROBE_DEFER if no dmtimer platform data
If a pwm-omap-dmtimer is probed before the dmtimer it uses, the platform
data won't be set yet.
Fixes: ac30751df953 ("ARM: OMAP: pdata-quirks: Remove unused timer pdata")
Cc: <[email protected]> # 4.17+
Signed-off-by: David Rivshin <[email protected]>
Acked-by: Pavel Machek <[email protected]>
Tested-by: Pavel Machek <[email protected]>
Acked-by: Ladislav Michl <[email protected]>
Tested-by: Andreas Kemnade <[email protected]>
Signed-off-by: Thierry Reding <[email protected]>
-rw-r--r-- | drivers/pwm/pwm-omap-dmtimer.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/pwm/pwm-omap-dmtimer.c b/drivers/pwm/pwm-omap-dmtimer.c index 665da3c8fbce..f45798679e3c 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; } |