mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-30 03:27:44 -04:00
hwrng: atmel - use clk_prepapre_enable/_disable_unprepare
Use clk_prepare_enable/_disable_unprepare instead of clk_enable/disable to work properly with the CCF. Signed-off-by: Boris Brezillon <[email protected]> Acked-by: Peter Korsgaard <[email protected]> Acked-by: Nicolas Ferre <[email protected]> Signed-off-by: Herbert Xu <[email protected]>
This commit is contained in:
parent
1e0bdad025
commit
21961efa13
1 changed files with 4 additions and 4 deletions
|
|
@ -67,7 +67,7 @@ static int atmel_trng_probe(struct platform_device *pdev)
|
|||
if (IS_ERR(trng->clk))
|
||||
return PTR_ERR(trng->clk);
|
||||
|
||||
ret = clk_enable(trng->clk);
|
||||
ret = clk_prepare_enable(trng->clk);
|
||||
if (ret)
|
||||
return ret;
|
||||
|
||||
|
|
@ -95,7 +95,7 @@ static int atmel_trng_remove(struct platform_device *pdev)
|
|||
hwrng_unregister(&trng->rng);
|
||||
|
||||
writel(TRNG_KEY, trng->base + TRNG_CR);
|
||||
clk_disable(trng->clk);
|
||||
clk_disable_unprepare(trng->clk);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
|
@ -105,7 +105,7 @@ static int atmel_trng_suspend(struct device *dev)
|
|||
{
|
||||
struct atmel_trng *trng = dev_get_drvdata(dev);
|
||||
|
||||
clk_disable(trng->clk);
|
||||
clk_disable_unprepare(trng->clk);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
|
@ -114,7 +114,7 @@ static int atmel_trng_resume(struct device *dev)
|
|||
{
|
||||
struct atmel_trng *trng = dev_get_drvdata(dev);
|
||||
|
||||
return clk_enable(trng->clk);
|
||||
return clk_prepare_enable(trng->clk);
|
||||
}
|
||||
|
||||
static const struct dev_pm_ops atmel_trng_pm_ops = {
|
||||
|
|
|
|||
Loading…
Reference in a new issue