Commit 0c7fe32e authored by Jisheng Zhang's avatar Jisheng Zhang Committed by Ulf Hansson

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: default avatarJisheng Zhang <jszhang@marvell.com>
Acked-by: default avatarSören Brinkmann <soren.brinkmann@xilinx.com>
Acked-by: default avatarAdrian Hunter <adrian.hunter@intel.com>
Signed-off-by: default avatarUlf Hansson <ulf.hansson@linaro.org>
parent 6f699531
...@@ -201,13 +201,16 @@ static int sdhci_arasan_probe(struct platform_device *pdev) ...@@ -201,13 +201,16 @@ static int sdhci_arasan_probe(struct platform_device *pdev)
static int sdhci_arasan_remove(struct platform_device *pdev) static int sdhci_arasan_remove(struct platform_device *pdev)
{ {
int ret;
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_arasan_data *sdhci_arasan = pltfm_host->priv; struct sdhci_arasan_data *sdhci_arasan = pltfm_host->priv;
ret = sdhci_pltfm_unregister(pdev);
clk_disable_unprepare(sdhci_arasan->clk_ahb); clk_disable_unprepare(sdhci_arasan->clk_ahb);
return sdhci_pltfm_unregister(pdev); return ret;
} }
static const struct of_device_id sdhci_arasan_of_match[] = { static const struct of_device_id sdhci_arasan_of_match[] = {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment