mtd: atmel_nand: fix deferred probe from __init
authorJohan Hovold <jhovold@gmail.com>
Mon, 23 Sep 2013 14:27:28 +0000 (16:27 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 26 Sep 2013 23:18:32 +0000 (16:18 -0700)
commit2c2b928584f0b60e09031c06362d8b42ec55a7cd
treed86a0a89e77e58c58645bd3ac38267a8cdcf56cf
parent1867adee6ed7793a256ecdd623e1337988223c09
mtd: atmel_nand: 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")
this driver might return -EPROBE_DEFER if a gpio_request fails.

Cc: David Woodhouse <dwmw2@infradead.org>
Cc: Josh Wu <josh.wu@atmel.com>
Signed-off-by: Johan Hovold <jhovold@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/mtd/nand/atmel_nand.c