提交 164cda52 编写于 作者: S Shawn Guo 提交者: Chris Ball

mmc: remove unncessary mmc_gpio_free_cd() call from slot-gpio users

Since slot-gpio uses devm_* managed functions in mmc_gpio_request_cd()
now, we can remove those mmc_gpio_free_cd() call from host drivers'
.probe() error path and .remove().
Signed-off-by: NShawn Guo <shawn.guo@linaro.org>
Acked-by: NGuennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: NChris Ball <cjb@laptop.org>
上级 d65b5ae8
...@@ -316,7 +316,6 @@ static int sdhci_pxav3_probe(struct platform_device *pdev) ...@@ -316,7 +316,6 @@ static int sdhci_pxav3_probe(struct platform_device *pdev)
err_add_host: err_add_host:
clk_disable_unprepare(clk); clk_disable_unprepare(clk);
clk_put(clk); clk_put(clk);
mmc_gpio_free_cd(host->mmc);
err_cd_req: err_cd_req:
err_clk_get: err_clk_get:
sdhci_pltfm_free(pdev); sdhci_pltfm_free(pdev);
...@@ -329,16 +328,12 @@ static int sdhci_pxav3_remove(struct platform_device *pdev) ...@@ -329,16 +328,12 @@ static int sdhci_pxav3_remove(struct platform_device *pdev)
struct sdhci_host *host = platform_get_drvdata(pdev); struct sdhci_host *host = platform_get_drvdata(pdev);
struct sdhci_pltfm_host *pltfm_host = sdhci_priv(host); struct sdhci_pltfm_host *pltfm_host = sdhci_priv(host);
struct sdhci_pxa *pxa = pltfm_host->priv; struct sdhci_pxa *pxa = pltfm_host->priv;
struct sdhci_pxa_platdata *pdata = pdev->dev.platform_data;
sdhci_remove_host(host, 1); sdhci_remove_host(host, 1);
clk_disable_unprepare(pltfm_host->clk); clk_disable_unprepare(pltfm_host->clk);
clk_put(pltfm_host->clk); clk_put(pltfm_host->clk);
if (gpio_is_valid(pdata->ext_cd_gpio))
mmc_gpio_free_cd(host->mmc);
sdhci_pltfm_free(pdev); sdhci_pltfm_free(pdev);
kfree(pxa); kfree(pxa);
......
...@@ -1404,8 +1404,6 @@ static int sh_mmcif_probe(struct platform_device *pdev) ...@@ -1404,8 +1404,6 @@ static int sh_mmcif_probe(struct platform_device *pdev)
return ret; return ret;
emmcaddh: emmcaddh:
if (pd && pd->use_cd_gpio)
mmc_gpio_free_cd(mmc);
erqcd: erqcd:
free_irq(irq[1], host); free_irq(irq[1], host);
ereqirq1: ereqirq1:
...@@ -1427,7 +1425,6 @@ static int sh_mmcif_probe(struct platform_device *pdev) ...@@ -1427,7 +1425,6 @@ static int sh_mmcif_probe(struct platform_device *pdev)
static int sh_mmcif_remove(struct platform_device *pdev) static int sh_mmcif_remove(struct platform_device *pdev)
{ {
struct sh_mmcif_host *host = platform_get_drvdata(pdev); struct sh_mmcif_host *host = platform_get_drvdata(pdev);
struct sh_mmcif_plat_data *pd = pdev->dev.platform_data;
int irq[2]; int irq[2];
host->dying = true; host->dying = true;
...@@ -1436,9 +1433,6 @@ static int sh_mmcif_remove(struct platform_device *pdev) ...@@ -1436,9 +1433,6 @@ static int sh_mmcif_remove(struct platform_device *pdev)
dev_pm_qos_hide_latency_limit(&pdev->dev); dev_pm_qos_hide_latency_limit(&pdev->dev);
if (pd && pd->use_cd_gpio)
mmc_gpio_free_cd(host->mmc);
mmc_remove_host(host->mmc); mmc_remove_host(host->mmc);
sh_mmcif_writel(host->addr, MMCIF_CE_INT_MASK, MASK_ALL); sh_mmcif_writel(host->addr, MMCIF_CE_INT_MASK, MASK_ALL);
......
...@@ -1060,16 +1060,8 @@ EXPORT_SYMBOL(tmio_mmc_host_probe); ...@@ -1060,16 +1060,8 @@ EXPORT_SYMBOL(tmio_mmc_host_probe);
void tmio_mmc_host_remove(struct tmio_mmc_host *host) void tmio_mmc_host_remove(struct tmio_mmc_host *host)
{ {
struct platform_device *pdev = host->pdev; struct platform_device *pdev = host->pdev;
struct tmio_mmc_data *pdata = host->pdata;
struct mmc_host *mmc = host->mmc; struct mmc_host *mmc = host->mmc;
if (pdata->flags & TMIO_MMC_USE_GPIO_CD)
/*
* This means we can miss a card-eject, but this is anyway
* possible, because of delayed processing of hotplug events.
*/
mmc_gpio_free_cd(mmc);
if (!host->native_hotplug) if (!host->native_hotplug)
pm_runtime_get_sync(&pdev->dev); pm_runtime_get_sync(&pdev->dev);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册