Skip to content

Commit

Permalink
ENGR00287331-3 sdhci-esdhc-imx: do not need disable clock during remo…
Browse files Browse the repository at this point in the history
…ve function

Since the clock is managed by runtime pm currently, we do not need
disable it again during driver remove function, or it will cause
clock disable count mismatch issue since the clocks have already been disabled.

mx6slevk:/sys/bus/platform/drivers/sdhci-esdhc-imx# echo 2194000.usdhc > unbind
mmc1: card aaaa removed
------------[ cut here ]------------
WARNING: at drivers/clk/clk.c:780 clk_disable+0x18/0x24()
....

Signed-off-by: Dong Aisheng <b29396@freescale.com>
  • Loading branch information
Dong Aisheng authored and Nitin Garg committed Apr 16, 2014
1 parent eb22f88 commit b072ad1
Showing 1 changed file with 0 additions and 6 deletions.
6 changes: 0 additions & 6 deletions drivers/mmc/host/sdhci-esdhc-imx.c
Original file line number Diff line number Diff line change
Expand Up @@ -1169,19 +1169,13 @@ static int sdhci_esdhc_imx_probe(struct platform_device *pdev)
static int sdhci_esdhc_imx_remove(struct platform_device *pdev)
{
struct sdhci_host *host = platform_get_drvdata(pdev);
struct sdhci_pltfm_host *pltfm_host = sdhci_priv(host);
struct pltfm_imx_data *imx_data = pltfm_host->priv;
int dead = (readl(host->ioaddr + SDHCI_INT_STATUS) == 0xffffffff);

sdhci_remove_host(host, dead);

pm_runtime_dont_use_autosuspend(&pdev->dev);
pm_runtime_disable(&pdev->dev);

clk_disable_unprepare(imx_data->clk_per);
clk_disable_unprepare(imx_data->clk_ipg);
clk_disable_unprepare(imx_data->clk_ahb);

sdhci_pltfm_free(pdev);

return 0;
Expand Down

0 comments on commit b072ad1

Please sign in to comment.