lkml.org 
[lkml]   [2012]   [May]   [26]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 03/15] hw_random: mxc-rnga: Use clk_prepare_enable/clk_disable_unprepare
On Fri, May 25, 2012 at 08:14:44PM -0300, Fabio Estevam wrote:
> From: Fabio Estevam <fabio.estevam@freescale.com>
>
> Prepare the clock before enabling it.
>
> Cc: Herbert Xu <herbert@gondor.apana.org.au>
> Cc: <linux-kernel@vger.kernel.org>
> Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
> ---
> drivers/char/hw_random/mxc-rnga.c | 4 ++--
> 1 files changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/char/hw_random/mxc-rnga.c b/drivers/char/hw_random/mxc-rnga.c
> index 187c6be..6f20f56 100644
> --- a/drivers/char/hw_random/mxc-rnga.c
> +++ b/drivers/char/hw_random/mxc-rnga.c
> @@ -154,7 +154,7 @@ static int __init mxc_rnga_probe(struct platform_device *pdev)
> goto out;
> }
>
> - clk_enable(clk);
> + clk_prepare_enable(clk);
>
> res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
> if (!res) {
> @@ -196,7 +196,7 @@ err_ioremap:
> release_mem_region(res->start, resource_size(res));
>
> err_region:
> - clk_disable(clk);
> + clk_disable_unprepare(clk);

You forgot the clk_disable_unprepare in the remove path.

Sascha

--
Pengutronix e.K. | |
Industrial Linux Solutions | http://www.pengutronix.de/ |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 |
Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |


\
 
 \ /
  Last update: 2012-05-26 14:01    [W:0.088 / U:0.476 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site