linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Andreas Kemnade <andreas@kemnade.info>
To: Thierry Reding <thierry.reding@gmail.com>,
	linux-pwm@vger.kernel.org, linux-kernel@vger.kernel.org,
	letux-kernel@openphoenux.org, j-keerthy@ti.com, tony@atomide.com,
	linux-omap@vger.kernel.org
Cc: Andreas Kemnade <andreas@kemnade.info>
Subject: [PATCH] pwm: pwm-omap-dmtimer: fix probing problems by returning EPROBE_DEFER
Date: Sat, 28 Jul 2018 18:59:14 +0200	[thread overview]
Message-ID: <20180728165914.15871-1-andreas@kemnade.info> (raw)

I got this in the kernel log:
[    0.756042] omap-dmtimer-pwm dmtimer-pwm: dmtimer pdata structure NULL
[    0.756134] omap-dmtimer-pwm: probe of dmtimer-pwm failed with error -22

the probe function has to wait until omap_dm_timer_probe() in
clocksource/timer-ti-dm.c has initialized pdata, so defer probing

Fixes: b7290cf6ff78 (pwm: pwm-omap-dmtimer: Adapt driver to utilize dmtimer pdata ops)
Signed-off-by: Andreas Kemnade <andreas@kemnade.info>
---
 drivers/pwm/pwm-omap-dmtimer.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/drivers/pwm/pwm-omap-dmtimer.c b/drivers/pwm/pwm-omap-dmtimer.c
index 665da3c8fbce..808835179c2e 100644
--- a/drivers/pwm/pwm-omap-dmtimer.c
+++ b/drivers/pwm/pwm-omap-dmtimer.c
@@ -264,8 +264,7 @@ 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;
+		ret = -EPROBE_DEFER;
 		goto put;
 	}
 
-- 
2.11.0


             reply	other threads:[~2018-07-28 16:59 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-07-28 16:59 Andreas Kemnade [this message]
2018-07-28 20:35 ` [PATCH] pwm: pwm-omap-dmtimer: fix probing problems by returning EPROBE_DEFER Ladislav Michl
2018-07-29  6:32   ` H. Nikolaus Schaller
2018-07-29 18:08     ` Ladislav Michl
2018-07-29 18:19       ` H. Nikolaus Schaller
2018-07-30 22:56         ` David Rivshin
2018-07-31  6:35           ` H. Nikolaus Schaller
2018-07-31 14:35             ` David Rivshin

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20180728165914.15871-1-andreas@kemnade.info \
    --to=andreas@kemnade.info \
    --cc=j-keerthy@ti.com \
    --cc=letux-kernel@openphoenux.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-omap@vger.kernel.org \
    --cc=linux-pwm@vger.kernel.org \
    --cc=thierry.reding@gmail.com \
    --cc=tony@atomide.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).