aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/drivers/mmc/host/sdhci-pltfm.c
diff options
context:
space:
mode:
authorKevin Hao <haokexin@gmail.com>2015-02-27 15:47:30 +0800
committerUlf Hansson <ulf.hansson@linaro.org>2015-03-23 14:13:34 +0100
commit83eacdfa2529b4ee97fe16a3a3a41d1b03465e13 (patch)
tree282158f8efb849008b2a68c987af7abf6473b7e9 /drivers/mmc/host/sdhci-pltfm.c
parentmmc: sdhci-bcm-kona: kill the "external_clk" member in driver private struct (diff)
downloadwireguard-linux-83eacdfa2529b4ee97fe16a3a3a41d1b03465e13.tar.xz
wireguard-linux-83eacdfa2529b4ee97fe16a3a3a41d1b03465e13.zip
mmc: sdhci: disable the clock in sdhci_pltfm_unregister()
So we can avoid to sprinkle the clk_disable_unprepare() in many drivers. Signed-off-by: Kevin Hao <haokexin@gmail.com> Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
Diffstat (limited to 'drivers/mmc/host/sdhci-pltfm.c')
-rw-r--r--drivers/mmc/host/sdhci-pltfm.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/mmc/host/sdhci-pltfm.c b/drivers/mmc/host/sdhci-pltfm.c
index c5b01d6bb85d..74c58d9a4fc8 100644
--- a/drivers/mmc/host/sdhci-pltfm.c
+++ b/drivers/mmc/host/sdhci-pltfm.c
@@ -225,9 +225,11 @@ EXPORT_SYMBOL_GPL(sdhci_pltfm_register);
int sdhci_pltfm_unregister(struct platform_device *pdev)
{
struct sdhci_host *host = platform_get_drvdata(pdev);
+ struct sdhci_pltfm_host *pltfm_host = sdhci_priv(host);
int dead = (readl(host->ioaddr + SDHCI_INT_STATUS) == 0xffffffff);
sdhci_remove_host(host, dead);
+ clk_disable_unprepare(pltfm_host->clk);
sdhci_pltfm_free(pdev);
return 0;