diff options
author | Johan Hovold <jhovold@gmail.com> | 2013-09-23 10:27:27 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2013-09-26 19:18:32 -0400 |
commit | 1867adee6ed7793a256ecdd623e1337988223c09 (patch) | |
tree | 305cf5948e6da5c95a6ea64924f3776a39407b8e /drivers/mmc/host | |
parent | 3f9120b0424f3e03c75518cb751f9e2bfa73c32a (diff) |
mmc: mvsdio: 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 the mmc_gpio_request_cd fails.
Cc: Nicolas Pitre <nico@fluxnic.net>
Cc: Chris Ball <cjb@laptop.org>
Signed-off-by: Johan Hovold <jhovold@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/mmc/host')
-rw-r--r-- | drivers/mmc/host/mvsdio.c | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/drivers/mmc/host/mvsdio.c b/drivers/mmc/host/mvsdio.c index 06c5b0b28ebc..deecee08c288 100644 --- a/drivers/mmc/host/mvsdio.c +++ b/drivers/mmc/host/mvsdio.c | |||
@@ -655,7 +655,7 @@ static const struct mmc_host_ops mvsd_ops = { | |||
655 | .enable_sdio_irq = mvsd_enable_sdio_irq, | 655 | .enable_sdio_irq = mvsd_enable_sdio_irq, |
656 | }; | 656 | }; |
657 | 657 | ||
658 | static void __init | 658 | static void |
659 | mv_conf_mbus_windows(struct mvsd_host *host, | 659 | mv_conf_mbus_windows(struct mvsd_host *host, |
660 | const struct mbus_dram_target_info *dram) | 660 | const struct mbus_dram_target_info *dram) |
661 | { | 661 | { |
@@ -677,7 +677,7 @@ mv_conf_mbus_windows(struct mvsd_host *host, | |||
677 | } | 677 | } |
678 | } | 678 | } |
679 | 679 | ||
680 | static int __init mvsd_probe(struct platform_device *pdev) | 680 | static int mvsd_probe(struct platform_device *pdev) |
681 | { | 681 | { |
682 | struct device_node *np = pdev->dev.of_node; | 682 | struct device_node *np = pdev->dev.of_node; |
683 | struct mmc_host *mmc = NULL; | 683 | struct mmc_host *mmc = NULL; |
@@ -819,7 +819,7 @@ out: | |||
819 | return ret; | 819 | return ret; |
820 | } | 820 | } |
821 | 821 | ||
822 | static int __exit mvsd_remove(struct platform_device *pdev) | 822 | static int mvsd_remove(struct platform_device *pdev) |
823 | { | 823 | { |
824 | struct mmc_host *mmc = platform_get_drvdata(pdev); | 824 | struct mmc_host *mmc = platform_get_drvdata(pdev); |
825 | 825 | ||
@@ -872,7 +872,8 @@ static const struct of_device_id mvsdio_dt_ids[] = { | |||
872 | MODULE_DEVICE_TABLE(of, mvsdio_dt_ids); | 872 | MODULE_DEVICE_TABLE(of, mvsdio_dt_ids); |
873 | 873 | ||
874 | static struct platform_driver mvsd_driver = { | 874 | static struct platform_driver mvsd_driver = { |
875 | .remove = __exit_p(mvsd_remove), | 875 | .probe = mvsd_probe, |
876 | .remove = mvsd_remove, | ||
876 | .suspend = mvsd_suspend, | 877 | .suspend = mvsd_suspend, |
877 | .resume = mvsd_resume, | 878 | .resume = mvsd_resume, |
878 | .driver = { | 879 | .driver = { |
@@ -881,7 +882,7 @@ static struct platform_driver mvsd_driver = { | |||
881 | }, | 882 | }, |
882 | }; | 883 | }; |
883 | 884 | ||
884 | module_platform_driver_probe(mvsd_driver, mvsd_probe); | 885 | module_platform_driver(mvsd_driver); |
885 | 886 | ||
886 | /* maximum card clock frequency (default 50MHz) */ | 887 | /* maximum card clock frequency (default 50MHz) */ |
887 | module_param(maxfreq, int, 0); | 888 | module_param(maxfreq, int, 0); |