[RFC] bcm63xx-rng: use clk_{prepare_enable,disable_unprepare}

Jonas Gorski jonas.gorski at gmail.com
Sun Nov 11 23:50:40 EST 2012


Use proper clk_prepare/unprepare calls in preparation for switching to
the generic clock framework.

Signed-off-by: Jonas Gorski <jonas.gorski at gmail.com>
---
 drivers/char/hw_random/bcm63xx-rng.c |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/char/hw_random/bcm63xx-rng.c b/drivers/char/hw_random/bcm63xx-rng.c
index aec6a42..3693f56 100644
--- a/drivers/char/hw_random/bcm63xx-rng.c
+++ b/drivers/char/hw_random/bcm63xx-rng.c
@@ -122,7 +122,7 @@ static int __devinit bcm63xx_rng_probe(struct platform_device *pdev)
 		goto out_free_rng;
 	}
 
-	clk_enable(clk);
+	clk_prepare_enable(clk);
 
 	ret = hwrng_register(rng);
 	if (ret) {
@@ -135,7 +135,7 @@ static int __devinit bcm63xx_rng_probe(struct platform_device *pdev)
 	return 0;
 
 out_clk_disable:
-	clk_disable(clk);
+	clk_disable_unprepare(clk);
 out_free_rng:
 	platform_set_drvdata(pdev, NULL);
 	kfree(rng);
@@ -151,7 +151,7 @@ static int __devexit bcm63xx_rng_remove(struct platform_device *pdev)
 	struct bcm63xx_rng_priv *priv = to_rng_priv(rng);
 
 	hwrng_unregister(rng);
-	clk_disable(priv->clk);
+	clk_disable_unprepare(priv->clk);
 	kfree(priv);
 	kfree(rng);
 	platform_set_drvdata(pdev, NULL);
-- 
1.7.2.5



More information about the devicetree-discuss mailing list