From: Russell King Date: Thu, 22 Sep 2011 11:20:55 +0000 (+0100) Subject: clk: amba bus: convert to clk_prepare()/clk_unprepare() X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=ac3e2fa6770052a82d42fc4db194a27317518c97;p=GitHub%2Fexynos8895%2Fandroid_kernel_samsung_universal8895.git clk: amba bus: convert to clk_prepare()/clk_unprepare() Signed-off-by: Russell King --- diff --git a/drivers/amba/bus.c b/drivers/amba/bus.c index 84bdaace56c8..bd230e801131 100644 --- a/drivers/amba/bus.c +++ b/drivers/amba/bus.c @@ -460,9 +460,17 @@ static int amba_get_enable_pclk(struct amba_device *pcdev) if (IS_ERR(pclk)) return PTR_ERR(pclk); + ret = clk_prepare(pclk); + if (ret) { + clk_put(pclk); + return ret; + } + ret = clk_enable(pclk); - if (ret) + if (ret) { + clk_unprepare(pclk); clk_put(pclk); + } return ret; } @@ -472,6 +480,7 @@ static void amba_put_disable_pclk(struct amba_device *pcdev) struct clk *pclk = pcdev->pclk; clk_disable(pclk); + clk_unprepare(pclk); clk_put(pclk); }