aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/mmc/host/mvsdio.c
diff options
context:
space:
mode:
authorJohan Hovold <jhovold@gmail.com>2013-09-23 10:27:27 -0400
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2013-09-26 19:18:32 -0400
commit1867adee6ed7793a256ecdd623e1337988223c09 (patch)
tree305cf5948e6da5c95a6ea64924f3776a39407b8e /drivers/mmc/host/mvsdio.c
parent3f9120b0424f3e03c75518cb751f9e2bfa73c32a (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/mvsdio.c')
-rw-r--r--drivers/mmc/host/mvsdio.c11
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
658static void __init 658static void
659mv_conf_mbus_windows(struct mvsd_host *host, 659mv_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
680static int __init mvsd_probe(struct platform_device *pdev) 680static 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
822static int __exit mvsd_remove(struct platform_device *pdev) 822static 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[] = {
872MODULE_DEVICE_TABLE(of, mvsdio_dt_ids); 872MODULE_DEVICE_TABLE(of, mvsdio_dt_ids);
873 873
874static struct platform_driver mvsd_driver = { 874static 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
884module_platform_driver_probe(mvsd_driver, mvsd_probe); 885module_platform_driver(mvsd_driver);
885 886
886/* maximum card clock frequency (default 50MHz) */ 887/* maximum card clock frequency (default 50MHz) */
887module_param(maxfreq, int, 0); 888module_param(maxfreq, int, 0);