clk: amba bus: convert to clk_prepare()/clk_unprepare()
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
This commit is contained in:
parent
40d3e0f494
commit
ac3e2fa677
1 changed files with 11 additions and 2 deletions
|
@ -460,9 +460,17 @@ static int amba_get_enable_pclk(struct amba_device *pcdev)
|
||||||
if (IS_ERR(pclk))
|
if (IS_ERR(pclk))
|
||||||
return PTR_ERR(pclk);
|
return PTR_ERR(pclk);
|
||||||
|
|
||||||
ret = clk_enable(pclk);
|
ret = clk_prepare(pclk);
|
||||||
if (ret)
|
if (ret) {
|
||||||
clk_put(pclk);
|
clk_put(pclk);
|
||||||
|
return ret;
|
||||||
|
}
|
||||||
|
|
||||||
|
ret = clk_enable(pclk);
|
||||||
|
if (ret) {
|
||||||
|
clk_unprepare(pclk);
|
||||||
|
clk_put(pclk);
|
||||||
|
}
|
||||||
|
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
@ -472,6 +480,7 @@ static void amba_put_disable_pclk(struct amba_device *pcdev)
|
||||||
struct clk *pclk = pcdev->pclk;
|
struct clk *pclk = pcdev->pclk;
|
||||||
|
|
||||||
clk_disable(pclk);
|
clk_disable(pclk);
|
||||||
|
clk_unprepare(pclk);
|
||||||
clk_put(pclk);
|
clk_put(pclk);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue