summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorJisheng Zhang <jszhang@marvell.com>2016-02-16 21:08:23 +0800
committerUlf Hansson <ulf.hansson@linaro.org>2016-02-29 11:03:27 +0100
commit0c7fe32e847ff20d1ae04b4b9f3e32f8551b4a6a (patch)
tree12f4639af60eddc80bc9a769c97248efb833c237 /drivers
parent6f699531b66aad7233bef797265ac6ff21bb4f73 (diff)
mmc: sdhci-of-arasan: fix clk issue in sdhci_arasan_remove()
sdhci_pltfm_unregister() could operate host's registers, it will cause problems if the clk is already disabled and unprepared. Fix this issue by moving the clk_disable_unprepare() call to the end of remove function. Signed-off-by: Jisheng Zhang <jszhang@marvell.com> Acked-by: Sören Brinkmann <soren.brinkmann@xilinx.com> Acked-by: Adrian Hunter <adrian.hunter@intel.com> Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/mmc/host/sdhci-of-arasan.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/drivers/mmc/host/sdhci-of-arasan.c b/drivers/mmc/host/sdhci-of-arasan.c
index 5d9fdb353446..8b4f8f7ad060 100644
--- a/drivers/mmc/host/sdhci-of-arasan.c
+++ b/drivers/mmc/host/sdhci-of-arasan.c
@@ -201,13 +201,16 @@ clk_dis_ahb:
static int sdhci_arasan_remove(struct platform_device *pdev)
{
+ int ret;
struct sdhci_host *host = platform_get_drvdata(pdev);
struct sdhci_pltfm_host *pltfm_host = sdhci_priv(host);
struct sdhci_arasan_data *sdhci_arasan = pltfm_host->priv;
+ ret = sdhci_pltfm_unregister(pdev);
+
clk_disable_unprepare(sdhci_arasan->clk_ahb);
- return sdhci_pltfm_unregister(pdev);
+ return ret;
}
static const struct of_device_id sdhci_arasan_of_match[] = {