[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <691ea59c733142d240b7ec7c6deb1607ff150744.1416475860.git.nicolas.ferre@atmel.com>
Date: Thu, 20 Nov 2014 10:43:22 +0100
From: Nicolas Ferre <nicolas.ferre@...el.com>
To: <linux-arm-kernel@...ts.infradead.org>,
<herbert@...dor.apana.org.au>
CC: <linux-kernel@...r.kernel.org>, <mpm@...enic.com>,
Boris BREZILLON <boris.brezillon@...e-electrons.com>,
Alexandre Belloni <alexandre.belloni@...e-electrons.com>,
Jean-Christophe PLAGNIOL-VILLARD <plagnioj@...osoft.com>,
<robh+dt@...nel.org>, <mark.rutland@....com>,
<linux-crypto@...r.kernel.org>, <devicetree@...r.kernel.org>,
<peter@...sgaard.com>
Subject: [PATCH RESEND v2 1/4] hwrng: atmel: use clk_prepapre_enable/_disable_unprepare
From: Boris Brezillon <boris.brezillon@...e-electrons.com>
Use clk_prepare_enable/_disable_unprepare instead of clk_enable/disable
to work properly with the CCF.
Signed-off-by: Boris Brezillon <boris.brezillon@...e-electrons.com>
Acked-by: Peter Korsgaard <peter@...sgaard.com>
Acked-by: Nicolas Ferre <nicolas.ferre@...el.com>
---
drivers/char/hw_random/atmel-rng.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/drivers/char/hw_random/atmel-rng.c b/drivers/char/hw_random/atmel-rng.c
index 851bc7e20ad2..644ec4882206 100644
--- a/drivers/char/hw_random/atmel-rng.c
+++ b/drivers/char/hw_random/atmel-rng.c
@@ -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 = {
--
2.1.3
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists