usb: phy: gpio-vbus: fix deferred probe from __init
authorJohan Hovold <jhovold@gmail.com>
Mon, 23 Sep 2013 14:27:31 +0000 (16:27 +0200)
committerFelipe Balbi <balbi@ti.com>
Mon, 23 Sep 2013 19:29:50 +0000 (14:29 -0500)
commiteaaa775b5f934f09b1f6ee91418ed97a8fdf0b7c
tree33c16aaa5fb2611dcacdd4870b2ef94c3993e378
parent8233729853b424778a6f383306159a8df669bdaf
usb: phy: gpio-vbus: fix deferred probe from __init

Move probe out of __init section and don't use platform_driver_probe
which cannot be used with deferred probing.

Since commit e9354576 ("gpiolib: Defer failed gpio requests by default")
and 04bf3011 ("regulator: Support driver probe deferral") this driver
might return -EPROBE_DEFER if a gpio_request or regulator_get fails.

Cc: Felipe Balbi <balbi@ti.com>
Signed-off-by: Johan Hovold <jhovold@gmail.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
drivers/usb/phy/phy-gpio-vbus-usb.c