From: Johan Hovold <jhovold@gmail.com>
To: Mark Brown <broonie@kernel.org>
Cc: Johan Hovold <jhovold@gmail.com>,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
Grant Likely <grant.likely@linaro.org>,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH] driver core: prevent deferred probe with platform_driver_probe
Date: Mon, 23 Sep 2013 14:28:06 +0200 [thread overview]
Message-ID: <20130923122806.GA1454@localhost> (raw)
In-Reply-To: <20130923110140.GB21013@sirena.org.uk>
On Mon, Sep 23, 2013 at 12:01:40PM +0100, Mark Brown wrote:
> On Mon, Sep 23, 2013 at 10:48:47AM +0200, Johan Hovold wrote:
> > Prevent drivers relying on platform_driver_probe from requesting
> > deferred probing in order to avoid further futile probe attempts (either
> > the driver has been unregistered or its probe function has been set to
> > platform_drv_probe_fail when probing is retried).
> >
> > Note that several platform drivers currently return subsystem errors
> > from probe and that these can include -EPROBE_DEFER (e.g. if a gpio
> > request fails).
>
> This doesn't seem like the right end to address the problem from, it
> seems like it would be better to move these drivers over to being normal
> plaform drivers. Using module_platform_driver() means relying on init
> ordering which is the sort of thing we're trying to get away from.
I actually started out doing that, but it's getting a bit hard to audit
which drivers could actually request probe deferral since gpio and later
other subsystems started returning -EPROBE_DEFER. I found six by just
grepping for gpio_request, but some of these calls can be made in helper
functions (e.g. mmc_gpio_request_cd even though that one was easy to
find).
Having a warning printed by platform_drv_probe if a platform driver
inadvertently requests probe deferral could be useful to catch any
mistakes even if we start moving probe functions out of __init.
I'll fix up the six drivers I found meanwhile.
Johan
next prev parent reply other threads:[~2013-09-23 12:28 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-09-23 8:48 [PATCH] driver core: prevent deferred probe with platform_driver_probe Johan Hovold
2013-09-23 11:01 ` Mark Brown
2013-09-23 12:28 ` Johan Hovold [this message]
2013-09-23 13:40 ` Mark Brown
2013-09-23 14:27 ` [PATCH 0/7] " Johan Hovold
2013-09-23 14:27 ` [PATCH 1/7] " Johan Hovold
2013-09-23 14:27 ` [PATCH 2/7] mmc: mvsdio: fix deferred probe from __init Johan Hovold
2013-09-23 14:27 ` [PATCH 3/7] mtd: atmel_nand: " Johan Hovold
2013-09-23 14:27 ` [PATCH 4/7] pcmcia: at91_cf: " Johan Hovold
2013-09-23 16:53 ` Nicolas Ferre
2013-09-23 14:27 ` [PATCH 5/7] usb: gadget: pxa25x_udc: " Johan Hovold
2013-09-23 14:27 ` [PATCH 6/7] usb: phy: gpio-vbus: " Johan Hovold
2013-09-23 14:27 ` [PATCH 7/7] backlight: atmel-pwm-bl: " Johan Hovold
2013-09-23 14:50 ` [PATCH 0/7] driver core: prevent deferred probe with platform_driver_probe Sascha Hauer
2013-09-23 15:20 ` Johan Hovold
2013-09-23 15:24 ` Sascha Hauer
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=20130923122806.GA1454@localhost \
--to=jhovold@gmail.com \
--cc=broonie@kernel.org \
--cc=grant.likely@linaro.org \
--cc=gregkh@linuxfoundation.org \
--cc=linux-kernel@vger.kernel.org \
/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