All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2] pwm: pwm-omap-dmtimer: return -EPROBE_DEFER if no dmtimer platform data
@ 2018-07-26 13:36 ` David Rivshin
  0 siblings, 0 replies; 12+ messages in thread
From: David Rivshin @ 2018-07-26 13:36 UTC (permalink / raw)
  To: Thierry Reding, Keerthy, Ladislav Michl, Neil Armstrong
  Cc: linux-pwm, Tony Lindgren, Pavel Machek, Thomas Gleixner,
	linux-omap, linux-arm-kernel

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.

Fixes: ac30751df953 ("ARM: OMAP: pdata-quirks: Remove unused timer pdata")
Cc: <stable@vger.kernel.org> # 4.17+
Signed-off-by: David Rivshin <drivshin@allworx.com>
Acked-by: Pavel Machek <pavel@ucw.cz>
Tested-by: Pavel Machek <pavel@ucw.cz>
---
Changes in v2:
* Added Pavel's Acked-by/Tested-by [1]

[1] https://lkml.org/lkml/2018/7/16/346

 drivers/pwm/pwm-omap-dmtimer.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/drivers/pwm/pwm-omap-dmtimer.c b/drivers/pwm/pwm-omap-dmtimer.c
index 665da3c8fbceb..d3d7ea7a53146 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_info(&pdev->dev,
+			 "dmtimer pdata structure NULL, deferring probe\n");
+		ret = -EPROBE_DEFER;
 		goto put;
 	}
 

base-commit: d72e90f33aa4709ebecc5005562f52335e106a60
-- 
2.17.1

^ permalink raw reply related	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2018-07-27 13:42 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-07-26 13:36 [PATCH v2] pwm: pwm-omap-dmtimer: return -EPROBE_DEFER if no dmtimer platform data David Rivshin
2018-07-26 13:36 ` David Rivshin
2018-07-26 18:54 ` Ladislav Michl
2018-07-26 18:54   ` Ladislav Michl
2018-07-26 20:37   ` David Rivshin
2018-07-26 20:37     ` David Rivshin
2018-07-27  7:19     ` Ladislav Michl
2018-07-27  7:19       ` Ladislav Michl
2018-07-27 11:00       ` Pavel Machek
2018-07-27 11:00         ` Pavel Machek
2018-07-27 13:42         ` David Rivshin
2018-07-27 13:42           ` David Rivshin

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.