aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/pcmcia
diff options
context:
space:
mode:
authorJohan Hovold <jhovold@gmail.com>2013-09-23 10:27:29 -0400
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2013-09-26 19:18:32 -0400
commit16a7c7cfd21cca8a260b63467e4f5c6a6d548b09 (patch)
treeafc4909a331ffe1c79af8f767b726148f8c7df79 /drivers/pcmcia
parent2c2b928584f0b60e09031c06362d8b42ec55a7cd (diff)
pcmcia: at91_cf: 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: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com> Signed-off-by: Johan Hovold <jhovold@gmail.com> Acked-by: Nicolas Ferre <nicolas.ferre@atmel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/pcmcia')
-rw-r--r--drivers/pcmcia/at91_cf.c11
1 files changed, 5 insertions, 6 deletions
diff --git a/drivers/pcmcia/at91_cf.c b/drivers/pcmcia/at91_cf.c
index b8f5acf02261..de24232c5191 100644
--- a/drivers/pcmcia/at91_cf.c
+++ b/drivers/pcmcia/at91_cf.c
@@ -245,7 +245,7 @@ static int at91_cf_dt_init(struct platform_device *pdev)
245} 245}
246#endif 246#endif
247 247
248static int __init at91_cf_probe(struct platform_device *pdev) 248static int at91_cf_probe(struct platform_device *pdev)
249{ 249{
250 struct at91_cf_socket *cf; 250 struct at91_cf_socket *cf;
251 struct at91_cf_data *board = pdev->dev.platform_data; 251 struct at91_cf_data *board = pdev->dev.platform_data;
@@ -354,7 +354,7 @@ fail0a:
354 return status; 354 return status;
355} 355}
356 356
357static int __exit at91_cf_remove(struct platform_device *pdev) 357static int at91_cf_remove(struct platform_device *pdev)
358{ 358{
359 struct at91_cf_socket *cf = platform_get_drvdata(pdev); 359 struct at91_cf_socket *cf = platform_get_drvdata(pdev);
360 360
@@ -404,14 +404,13 @@ static struct platform_driver at91_cf_driver = {
404 .owner = THIS_MODULE, 404 .owner = THIS_MODULE,
405 .of_match_table = of_match_ptr(at91_cf_dt_ids), 405 .of_match_table = of_match_ptr(at91_cf_dt_ids),
406 }, 406 },
407 .remove = __exit_p(at91_cf_remove), 407 .probe = at91_cf_probe,
408 .remove = at91_cf_remove,
408 .suspend = at91_cf_suspend, 409 .suspend = at91_cf_suspend,
409 .resume = at91_cf_resume, 410 .resume = at91_cf_resume,
410}; 411};
411 412
412/*--------------------------------------------------------------------------*/ 413module_platform_driver(at91_cf_driver);
413
414module_platform_driver_probe(at91_cf_driver, at91_cf_probe);
415 414
416MODULE_DESCRIPTION("AT91 Compact Flash Driver"); 415MODULE_DESCRIPTION("AT91 Compact Flash Driver");
417MODULE_AUTHOR("David Brownell"); 416MODULE_AUTHOR("David Brownell");