summaryrefslogtreecommitdiffstats
path: root/drivers/mmc/host
diff options
context:
space:
mode:
authorMasahiro Yamada <yamada.masahiro@socionext.com>2017-11-25 01:24:43 +0900
committerUlf Hansson <ulf.hansson@linaro.org>2017-12-18 13:56:58 +0100
commitcd82cd213bfa532ca368e4333ba6a0f14185ef9c (patch)
tree35eade8d394fc1efe4db5ba1b71432754733d533 /drivers/mmc/host
parent2aaa3c5193db9cdfe62201aa4eb4e1007a43fdc8 (diff)
downloadtalos-op-linux-cd82cd213bfa532ca368e4333ba6a0f14185ef9c.tar.gz
talos-op-linux-cd82cd213bfa532ca368e4333ba6a0f14185ef9c.zip
mmc: tmio: move mmc_gpio_request_cd() before mmc_add_host()
Drivers do not need to call mmc_gpiod_request_cd_irq() explicitly because mmc_start_host() calls it. To make it work, cd_gpio must be set before mmc_add_host(). Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com> Reviewed-by: Wolfram Sang <wsa+renesas@sang-engineering.com> Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
Diffstat (limited to 'drivers/mmc/host')
-rw-r--r--drivers/mmc/host/tmio_mmc_core.c14
1 files changed, 6 insertions, 8 deletions
diff --git a/drivers/mmc/host/tmio_mmc_core.c b/drivers/mmc/host/tmio_mmc_core.c
index 1abe83b9f568..6b18c0509ff4 100644
--- a/drivers/mmc/host/tmio_mmc_core.c
+++ b/drivers/mmc/host/tmio_mmc_core.c
@@ -1205,6 +1205,12 @@ int tmio_mmc_host_probe(struct tmio_mmc_host *_host,
if (ret < 0)
return ret;
+ if (pdata->flags & TMIO_MMC_USE_GPIO_CD) {
+ ret = mmc_gpio_request_cd(mmc, pdata->cd_gpio, 0);
+ if (ret)
+ return ret;
+ }
+
mmc->caps |= MMC_CAP_4_BIT_DATA | pdata->capabilities;
mmc->caps2 |= pdata->capabilities2;
mmc->max_segs = pdata->max_segs ? : 32;
@@ -1300,14 +1306,6 @@ int tmio_mmc_host_probe(struct tmio_mmc_host *_host,
dev_pm_qos_expose_latency_limit(&pdev->dev, 100);
- if (pdata->flags & TMIO_MMC_USE_GPIO_CD) {
- ret = mmc_gpio_request_cd(mmc, pdata->cd_gpio, 0);
- if (ret)
- goto remove_host;
-
- mmc_gpiod_request_cd_irq(mmc);
- }
-
return 0;
remove_host:
OpenPOWER on IntegriCloud