[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20130923134028.GF21013@sirena.org.uk>
Date: Mon, 23 Sep 2013 14:40:28 +0100
From: Mark Brown <broonie@...nel.org>
To: Johan Hovold <jhovold@...il.com>
Cc: Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
Grant Likely <grant.likely@...aro.org>,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH] driver core: prevent deferred probe with
platform_driver_probe
On Mon, Sep 23, 2013 at 02:28:06PM +0200, Johan Hovold wrote:
> On Mon, Sep 23, 2013 at 12:01:40PM +0100, Mark Brown wrote:
> > 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).
I think it's just the case that all drivers ought to be being converted
to module_platform_driver(), platform_driver_probe() is probably going
to be more trouble than it's worth to use going forwards as it's not
great for single zImage and other distro style usage.
> 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.
Haing a warning is useful, yes.
Download attachment "signature.asc" of type "application/pgp-signature" (837 bytes)
Powered by blists - more mailing lists