Thread (2 messages) 2 messages, 2 authors, 2018-08-20
STALE2863d REVIEWED: 6 (3M)

[PATCH v4] pwm: pwm-omap-dmtimer: return -EPROBE_DEFER if no dmtimer platform data

From: David Rivshin <hidden>
Date: 2018-08-01 14:17:29
Also in: linux-omap, linux-pwm
Subsystem: pwm subsystem, the rest · Maintainers: Uwe Kleine-König, Linus Torvalds

From: David Rivshin <redacted>

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: <redacted> # 4.17+
Signed-off-by: David Rivshin <redacted>
Acked-by: Pavel Machek <redacted>
Tested-by: Pavel Machek <redacted>
Acked-by: Ladislav Michl <redacted>
Tested-by: Andreas Kemnade <andreas@kemnade.info>
---
Changes in v4:
* Added Ladislav's Acked-by [2]
* Added Andreas's Tested-by [3]
Changes in v3:
* Changed dev_info to dev_dbg
Changes in v2:
* Added Pavel's Acked-by/Tested-by [1]

[1] https://lkml.org/lkml/2018/7/16/346
[2] https://www.spinics.net/lists/arm-kernel/msg668768.html
[3] https://www.spinics.net/lists/arm-kernel/msg669302.html

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..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;
 	}
 
base-commit: acb1872577b346bd15ab3a3f8dff780d6cca4b70
-- 
2.17.1
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help