linux-pwm.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v4] pwm: pwm-omap-dmtimer: return -EPROBE_DEFER if no dmtimer platform data
@ 2018-08-01 14:17 David Rivshin
  2018-08-20  9:25 ` Thierry Reding
  0 siblings, 1 reply; 2+ messages in thread
From: David Rivshin @ 2018-08-01 14:17 UTC (permalink / raw)
  To: Thierry Reding, Keerthy, Ladislav Michl, Neil Armstrong
  Cc: linux-pwm, Tony Lindgren, H. Nikolaus Schaller, Andreas Kemnade,
	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>
Acked-by: Ladislav Michl <ladis@linux-mips.org>
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

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

* Re: [PATCH v4] pwm: pwm-omap-dmtimer: return -EPROBE_DEFER if no dmtimer platform data
  2018-08-01 14:17 [PATCH v4] pwm: pwm-omap-dmtimer: return -EPROBE_DEFER if no dmtimer platform data David Rivshin
@ 2018-08-20  9:25 ` Thierry Reding
  0 siblings, 0 replies; 2+ messages in thread
From: Thierry Reding @ 2018-08-20  9:25 UTC (permalink / raw)
  To: David Rivshin
  Cc: linux-pwm, Ladislav Michl, Neil Armstrong, Tony Lindgren, Keerthy,
	Andreas Kemnade, Pavel Machek, H. Nikolaus Schaller,
	Thomas Gleixner, linux-omap, linux-arm-kernel


[-- Attachment #1.1: Type: text/plain, Size: 1090 bytes --]

On Wed, Aug 01, 2018 at 10:17:29AM -0400, David Rivshin 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.
> 
> 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>
> Acked-by: Ladislav Michl <ladis@linux-mips.org>
> 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(-)

Applied, thanks.

Thierry

[-- Attachment #1.2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

[-- Attachment #2: Type: text/plain, Size: 176 bytes --]

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

end of thread, other threads:[~2018-08-20  9:25 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-08-01 14:17 [PATCH v4] pwm: pwm-omap-dmtimer: return -EPROBE_DEFER if no dmtimer platform data David Rivshin
2018-08-20  9:25 ` Thierry Reding

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).