Skip to content

driver core: prevent deferred probe with platform_driver_probe

Johan Hovold linux-fbdev linux-mmc linux-mtd lkml 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest7 patches 4 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/7driver core: prevent deferred probe with platform_driver_probedrivers/base/platform.c include/linux/platform_device.h+14 -40 replies
2/7mmc: mvsdio: fix deferred probe from __initdrivers/mmc/host/mvsdio.c+6 -50 replies
3/7mtd: atmel_nand: fix deferred probe from __initdrivers/mtd/nand/atmel_nand.c+7 -60 replies
4/7pcmcia: at91_cf: fix deferred probe from __initdrivers/pcmcia/at91_cf.c+5 -61 reply
5/7usb: gadget: pxa25x_udc: fix deferred probe from __initdrivers/usb/gadget/pxa25x_udc.c+5 -40 replies
6/7usb: phy: gpio-vbus: fix deferred probe from __initdrivers/usb/phy/phy-gpio-vbus-usb.c+5 -60 replies
7/7backlight: atmel-pwm-bl: fix deferred probe from __initdrivers/video/backlight/atmel-pwm-bl.c+5 -40 replies

Reviews trailers per patch

1 of 7 patches has a Reviewed-by or Acked-by.

PatchNicolas Ferre
1/7
2/7
3/7
4/7A-b
5/7
6/7
7/7

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v1 thread

Cover letter [PATCH 0/7] driver core: prevent deferred probe with platform_driver_probe

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.

Note that the mvsdio, at91_cf and pxa25x_udc patches are completely untested.

Johan

Johan Hovold (7):
driver core: prevent deferred probe with platform_driver_probe
mmc: mvsdio: fix deferred probe from __init
mtd: atmel_nand: fix deferred probe from __init
pcmcia: at91_cf: fix deferred probe from __init
usb: gadget: pxa25x_udc: fix deferred probe from __init
usb: phy: gpio-vbus: fix deferred probe from __init
backlight: atmel-pwm-bl: fix deferred probe from __init

 drivers/base/platform.c                | 17 +++++++++++++----
 drivers/mmc/host/mvsdio.c              | 11 ++++++-----
 drivers/mtd/nand/atmel_nand.c          | 13 +++++++------
 drivers/pcmcia/at91_cf.c               | 11 +++++------
 drivers/usb/gadget/pxa25x_udc.c        |  9 +++++----
 drivers/usb/phy/phy-gpio-vbus-usb.c    | 11 +++++------
 drivers/video/backlight/atmel-pwm-bl.c |  9 +++++----
 include/linux/platform_device.h        |  1 +
 8 files changed, 47 insertions(+), 35 deletions(-)
Signature · 1 line
1.8.3.2