From: Russell King Date: Thu, 22 Sep 2011 10:36:41 +0000 (+0100) Subject: clk: mmci: convert to clk_prepare()/clk_unprepare() X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=52ca0f3ab568497adeac217e4167b51d9b4d4884;p=linux-beck.git clk: mmci: convert to clk_prepare()/clk_unprepare() Signed-off-by: Russell King --- diff --git a/drivers/mmc/host/mmci.c b/drivers/mmc/host/mmci.c index 5e142b7f5ecf..7be8db0f9f7d 100644 --- a/drivers/mmc/host/mmci.c +++ b/drivers/mmc/host/mmci.c @@ -1160,10 +1160,14 @@ static int __devinit mmci_probe(struct amba_device *dev, goto host_free; } - ret = clk_enable(host->clk); + ret = clk_prepare(host->clk); if (ret) goto clk_free; + ret = clk_enable(host->clk); + if (ret) + goto clk_unprep; + host->plat = plat; host->variant = variant; host->mclk = clk_get_rate(host->clk); @@ -1351,6 +1355,8 @@ static int __devinit mmci_probe(struct amba_device *dev, iounmap(host->base); clk_disable: clk_disable(host->clk); + clk_unprep: + clk_unprepare(host->clk); clk_free: clk_put(host->clk); host_free: @@ -1398,6 +1404,7 @@ static int __devexit mmci_remove(struct amba_device *dev) iounmap(host->base); clk_disable(host->clk); + clk_unprepare(host->clk); clk_put(host->clk); if (host->vcc)