Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1335368

[PATCH v5 05/13] mmc: sdhci-of-arasan: fix clk issue in sdhci_arasan_remove()

From Jisheng Zhang <jszhang@marvell.com>
Newsgroups linux.kernel
Subject [PATCH v5 05/13] mmc: sdhci-of-arasan: fix clk issue in sdhci_arasan_remove()
Date 2016-02-16 14:20 +0100
Message-ID <r2NHR-8jx-31@gated-at.bofh.it> (permalink)
References <r2NHQ-8jx-3@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


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>
---
 drivers/mmc/host/sdhci-of-arasan.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/drivers/mmc/host/sdhci-of-arasan.c b/drivers/mmc/host/sdhci-of-arasan.c
index 5d9fdb3..8b4f8f7 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[] = {
-- 
2.7.0

Back to linux.kernel | Previous | Next | Find similar | Unroll thread


Thread

[PATCH v5 05/13] mmc: sdhci-of-arasan: fix clk issue in sdhci_arasan_remove() Jisheng Zhang <jszhang@marvell.com> - 2016-02-16 14:20 +0100

csiph-web