aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDavid Lechner <david@lechnology.com>2018-01-21 15:09:36 -0500
committerUlf Hansson <ulf.hansson@linaro.org>2018-01-22 02:21:39 -0500
commit6478f4e12b7663cf5ab5303c06f99e9ec8c2b859 (patch)
treeff8c804a49c6bcc6e933c6839ffd7a50fbe5cd0d
parent4a09d0b86bad0999a2bb0e2ee126a3c5246d1f51 (diff)
mmc: davinci: dont' use module_platform_driver_probe()
This changes module_platform_driver_probe() to module_platform_driver() in the TI DaVinci MMC driver. On device tree systems, we can get a -EPROBE_DEFER when using a pinmux for the CD GPIO, which results in the driver never loading because module_platform_driver_probe() prevents it from being re-probed. So, we replace module_platform_driver_probe() with module_platform_driver() and removed the __init attributes accordingly. Signed-off-by: David Lechner <david@lechnology.com> Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
-rw-r--r--drivers/mmc/host/davinci_mmc.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/drivers/mmc/host/davinci_mmc.c b/drivers/mmc/host/davinci_mmc.c
index 351330dfb954..c5309ccf502e 100644
--- a/drivers/mmc/host/davinci_mmc.c
+++ b/drivers/mmc/host/davinci_mmc.c
@@ -174,7 +174,7 @@ module_param(poll_loopcount, uint, S_IRUGO);
174MODULE_PARM_DESC(poll_loopcount, 174MODULE_PARM_DESC(poll_loopcount,
175 "Maximum polling loop count. Default = 32"); 175 "Maximum polling loop count. Default = 32");
176 176
177static unsigned __initdata use_dma = 1; 177static unsigned use_dma = 1;
178module_param(use_dma, uint, 0); 178module_param(use_dma, uint, 0);
179MODULE_PARM_DESC(use_dma, "Whether to use DMA or not. Default = 1"); 179MODULE_PARM_DESC(use_dma, "Whether to use DMA or not. Default = 1");
180 180
@@ -496,8 +496,7 @@ static int mmc_davinci_start_dma_transfer(struct mmc_davinci_host *host,
496 return ret; 496 return ret;
497} 497}
498 498
499static void __init_or_module 499static void davinci_release_dma_channels(struct mmc_davinci_host *host)
500davinci_release_dma_channels(struct mmc_davinci_host *host)
501{ 500{
502 if (!host->use_dma) 501 if (!host->use_dma)
503 return; 502 return;
@@ -506,7 +505,7 @@ davinci_release_dma_channels(struct mmc_davinci_host *host)
506 dma_release_channel(host->dma_rx); 505 dma_release_channel(host->dma_rx);
507} 506}
508 507
509static int __init davinci_acquire_dma_channels(struct mmc_davinci_host *host) 508static int davinci_acquire_dma_channels(struct mmc_davinci_host *host)
510{ 509{
511 host->dma_tx = dma_request_chan(mmc_dev(host->mmc), "tx"); 510 host->dma_tx = dma_request_chan(mmc_dev(host->mmc), "tx");
512 if (IS_ERR(host->dma_tx)) { 511 if (IS_ERR(host->dma_tx)) {
@@ -1201,7 +1200,7 @@ static int mmc_davinci_parse_pdata(struct mmc_host *mmc)
1201 return 0; 1200 return 0;
1202} 1201}
1203 1202
1204static int __init davinci_mmcsd_probe(struct platform_device *pdev) 1203static int davinci_mmcsd_probe(struct platform_device *pdev)
1205{ 1204{
1206 const struct of_device_id *match; 1205 const struct of_device_id *match;
1207 struct mmc_davinci_host *host = NULL; 1206 struct mmc_davinci_host *host = NULL;
@@ -1414,11 +1413,12 @@ static struct platform_driver davinci_mmcsd_driver = {
1414 .pm = davinci_mmcsd_pm_ops, 1413 .pm = davinci_mmcsd_pm_ops,
1415 .of_match_table = davinci_mmc_dt_ids, 1414 .of_match_table = davinci_mmc_dt_ids,
1416 }, 1415 },
1416 .probe = davinci_mmcsd_probe,
1417 .remove = __exit_p(davinci_mmcsd_remove), 1417 .remove = __exit_p(davinci_mmcsd_remove),
1418 .id_table = davinci_mmc_devtype, 1418 .id_table = davinci_mmc_devtype,
1419}; 1419};
1420 1420
1421module_platform_driver_probe(davinci_mmcsd_driver, davinci_mmcsd_probe); 1421module_platform_driver(davinci_mmcsd_driver);
1422 1422
1423MODULE_AUTHOR("Texas Instruments India"); 1423MODULE_AUTHOR("Texas Instruments India");
1424MODULE_LICENSE("GPL"); 1424MODULE_LICENSE("GPL");