All of lore.kernel.org
 help / color / mirror / Atom feed
From: Johan Hovold <jhovold@gmail.com>
To: Sascha Hauer <s.hauer@pengutronix.de>
Cc: Johan Hovold <jhovold@gmail.com>,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	Grant Likely <grant.likely@linaro.org>,
	Mark Brown <broonie@linaro.org>,
	linux-kernel@vger.kernel.org, linux-mmc@vger.kernel.org,
	linux-mtd@lists.infradead.org, linux-pcmcia@lists.infradead.org,
	linux-usb@vger.kernel.org, linux-fbdev@vger.kernel.org
Subject: Re: [PATCH 0/7] driver core: prevent deferred probe with platform_driver_probe
Date: Mon, 23 Sep 2013 15:20:18 +0000	[thread overview]
Message-ID: <20130923152018.GB1454@localhost> (raw)
In-Reply-To: <20130923145029.GV30088@pengutronix.de>

On Mon, Sep 23, 2013 at 04:50:29PM +0200, Sascha Hauer wrote:
> On Mon, Sep 23, 2013 at 04:27:25PM +0200, Johan Hovold wrote:
> > Deferred probing cannot be used with platform_driver_probe as by the
> > time probing is retried either the driver has been unregistered or its
> > probe function has been set to platform_drv_probe_fail.
> > 
> > With commit e9354576 ("gpiolib: Defer failed gpio requests by default")
> > the gpio subsystem started returning -EPROBE_DEFER, which in turn
> > several platform drivers using platform_driver_probe return to driver
> > core. Other subsystems (e.g. regulator) has since started doing the
> > same.
> > 
> > The first patch in this series prevents platform drivers using
> > platform_driver_probe from requesting probe deferral while warning that
> > it is not supported.
> > 
> > The remaining patches move six platform-driver probe functions that rely
> > on gpio_request out of __init. There are likely other probe functions
> > that might return -EPROBE_DEFER and should be moved out of __init as
> > well.
> 
> As usually when I read this I wonder why platform_driver_probe exists
> anyway. The only advantage I can think off is that the probe functions
> are in __init and thus can be disposed of later. Now you remove the
> __init annotations from these probe functions. Wouldn't it be better to
> convert the drivers to regular platform_driver_register instead?

Perhaps that paragraph was a bit unclear: I move them out of __init
_and_ use platform_driver_register instead of platform_driver_probe as
well.

Johan

WARNING: multiple messages have this Message-ID (diff)
From: Johan Hovold <jhovold@gmail.com>
To: Sascha Hauer <s.hauer@pengutronix.de>
Cc: Johan Hovold <jhovold@gmail.com>,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	Grant Likely <grant.likely@linaro.org>,
	Mark Brown <broonie@linaro.org>,
	linux-kernel@vger.kernel.org, linux-mmc@vger.kernel.org,
	linux-mtd@lists.infradead.org, linux-pcmcia@lists.infradead.org,
	linux-usb@vger.kernel.org, linux-fbdev@vger.kernel.org
Subject: Re: [PATCH 0/7] driver core: prevent deferred probe with platform_driver_probe
Date: Mon, 23 Sep 2013 17:20:18 +0200	[thread overview]
Message-ID: <20130923152018.GB1454@localhost> (raw)
In-Reply-To: <20130923145029.GV30088@pengutronix.de>

On Mon, Sep 23, 2013 at 04:50:29PM +0200, Sascha Hauer wrote:
> On Mon, Sep 23, 2013 at 04:27:25PM +0200, Johan Hovold wrote:
> > Deferred probing cannot be used with platform_driver_probe as by the
> > time probing is retried either the driver has been unregistered or its
> > probe function has been set to platform_drv_probe_fail.
> > 
> > With commit e9354576 ("gpiolib: Defer failed gpio requests by default")
> > the gpio subsystem started returning -EPROBE_DEFER, which in turn
> > several platform drivers using platform_driver_probe return to driver
> > core. Other subsystems (e.g. regulator) has since started doing the
> > same.
> > 
> > The first patch in this series prevents platform drivers using
> > platform_driver_probe from requesting probe deferral while warning that
> > it is not supported.
> > 
> > The remaining patches move six platform-driver probe functions that rely
> > on gpio_request out of __init. There are likely other probe functions
> > that might return -EPROBE_DEFER and should be moved out of __init as
> > well.
> 
> As usually when I read this I wonder why platform_driver_probe exists
> anyway. The only advantage I can think off is that the probe functions
> are in __init and thus can be disposed of later. Now you remove the
> __init annotations from these probe functions. Wouldn't it be better to
> convert the drivers to regular platform_driver_register instead?

Perhaps that paragraph was a bit unclear: I move them out of __init
_and_ use platform_driver_register instead of platform_driver_probe as
well.

Johan

WARNING: multiple messages have this Message-ID (diff)
From: Johan Hovold <jhovold@gmail.com>
To: Sascha Hauer <s.hauer@pengutronix.de>
Cc: linux-fbdev@vger.kernel.org, linux-usb@vger.kernel.org,
	Mark Brown <broonie@linaro.org>,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	Johan Hovold <jhovold@gmail.com>,
	linux-pcmcia@lists.infradead.org, linux-mmc@vger.kernel.org,
	linux-kernel@vger.kernel.org, linux-mtd@lists.infradead.org,
	Grant Likely <grant.likely@linaro.org>
Subject: Re: [PATCH 0/7] driver core: prevent deferred probe with platform_driver_probe
Date: Mon, 23 Sep 2013 17:20:18 +0200	[thread overview]
Message-ID: <20130923152018.GB1454@localhost> (raw)
In-Reply-To: <20130923145029.GV30088@pengutronix.de>

On Mon, Sep 23, 2013 at 04:50:29PM +0200, Sascha Hauer wrote:
> On Mon, Sep 23, 2013 at 04:27:25PM +0200, Johan Hovold wrote:
> > Deferred probing cannot be used with platform_driver_probe as by the
> > time probing is retried either the driver has been unregistered or its
> > probe function has been set to platform_drv_probe_fail.
> > 
> > With commit e9354576 ("gpiolib: Defer failed gpio requests by default")
> > the gpio subsystem started returning -EPROBE_DEFER, which in turn
> > several platform drivers using platform_driver_probe return to driver
> > core. Other subsystems (e.g. regulator) has since started doing the
> > same.
> > 
> > The first patch in this series prevents platform drivers using
> > platform_driver_probe from requesting probe deferral while warning that
> > it is not supported.
> > 
> > The remaining patches move six platform-driver probe functions that rely
> > on gpio_request out of __init. There are likely other probe functions
> > that might return -EPROBE_DEFER and should be moved out of __init as
> > well.
> 
> As usually when I read this I wonder why platform_driver_probe exists
> anyway. The only advantage I can think off is that the probe functions
> are in __init and thus can be disposed of later. Now you remove the
> __init annotations from these probe functions. Wouldn't it be better to
> convert the drivers to regular platform_driver_register instead?

Perhaps that paragraph was a bit unclear: I move them out of __init
_and_ use platform_driver_register instead of platform_driver_probe as
well.

Johan

  reply	other threads:[~2013-09-23 15:20 UTC|newest]

Thread overview: 46+ 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
2013-09-23 13:40     ` Mark Brown
2013-09-23 14:27       ` [PATCH 0/7] " Johan Hovold
2013-09-23 14:27         ` Johan Hovold
2013-09-23 14:27         ` Johan Hovold
2013-09-23 14:27         ` Johan Hovold
2013-09-23 14:27         ` [PATCH 1/7] " Johan Hovold
2013-09-23 14:27           ` Johan Hovold
2013-09-23 14:27           ` Johan Hovold
2013-09-23 14:27           ` Johan Hovold
2013-09-23 14:27         ` [PATCH 2/7] mmc: mvsdio: fix deferred probe from __init Johan Hovold
2013-09-23 14:27           ` Johan Hovold
2013-09-23 14:27           ` Johan Hovold
     [not found]         ` <1379946452-25649-1-git-send-email-jhovold-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2013-09-23 14:27           ` [PATCH 3/7] mtd: atmel_nand: " Johan Hovold
2013-09-23 14:27             ` Johan Hovold
2013-09-23 14:27             ` Johan Hovold
2013-09-23 14:27             ` Johan Hovold
2013-09-23 14:27           ` [PATCH 5/7] usb: gadget: pxa25x_udc: " Johan Hovold
2013-09-23 14:27             ` Johan Hovold
2013-09-23 14:27             ` Johan Hovold
2013-09-23 14:27             ` Johan Hovold
2013-09-23 14:27         ` [PATCH 4/7] pcmcia: at91_cf: " Johan Hovold
2013-09-23 14:27           ` Johan Hovold
2013-09-23 14:27           ` Johan Hovold
2013-09-23 14:27           ` Johan Hovold
2013-09-23 16:53           ` Nicolas Ferre
2013-09-23 16:53             ` Nicolas Ferre
2013-09-23 16:53             ` Nicolas Ferre
2013-09-23 16:53             ` Nicolas Ferre
2013-09-23 14:27         ` [PATCH 6/7] usb: phy: gpio-vbus: " Johan Hovold
2013-09-23 14:27           ` Johan Hovold
2013-09-23 14:27           ` Johan Hovold
2013-09-23 14:27         ` [PATCH 7/7] backlight: atmel-pwm-bl: " Johan Hovold
2013-09-23 14:27           ` Johan Hovold
2013-09-23 14:27           ` Johan Hovold
2013-09-23 14:50         ` [PATCH 0/7] driver core: prevent deferred probe with platform_driver_probe Sascha Hauer
2013-09-23 14:50           ` Sascha Hauer
2013-09-23 14:50           ` Sascha Hauer
2013-09-23 15:20           ` Johan Hovold [this message]
2013-09-23 15:20             ` Johan Hovold
2013-09-23 15:20             ` Johan Hovold
2013-09-23 15:24             ` Sascha Hauer
2013-09-23 15:24               ` Sascha Hauer
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=20130923152018.GB1454@localhost \
    --to=jhovold@gmail.com \
    --cc=broonie@linaro.org \
    --cc=grant.likely@linaro.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=linux-fbdev@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mmc@vger.kernel.org \
    --cc=linux-mtd@lists.infradead.org \
    --cc=linux-pcmcia@lists.infradead.org \
    --cc=linux-usb@vger.kernel.org \
    --cc=s.hauer@pengutronix.de \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.