Commit ac3e2fa6 authored by Russell King's avatar Russell King

clk: amba bus: convert to clk_prepare()/clk_unprepare()

Signed-off-by: default avatarRussell King <rmk+kernel@arm.linux.org.uk>
parent 40d3e0f4
......@@ -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);
}
......
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