Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752919Ab2E2JSI (ORCPT ); Tue, 29 May 2012 05:18:08 -0400 Received: from metis.ext.pengutronix.de ([92.198.50.35]:42326 "EHLO metis.ext.pengutronix.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751161Ab2E2JSG (ORCPT ); Tue, 29 May 2012 05:18:06 -0400 Date: Tue, 29 May 2012 11:17:57 +0200 From: Sascha Hauer To: Fabio Estevam Cc: kernel@pengutronix.de, shawn.guo@freescale.com, Fabio Estevam , Herbert Xu , linux-kernel@vger.kernel.org Subject: Re: [PATCH v2 03/15] hw_random: mxc-rnga: Use clk_prepare_enable/clk_disable_unprepare Message-ID: <20120529091757.GG30400@pengutronix.de> References: <1337987696-31728-4-git-send-email-festevam@gmail.com> <1338048232-3523-1-git-send-email-festevam@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1338048232-3523-1-git-send-email-festevam@gmail.com> X-Sent-From: Pengutronix Hildesheim X-URL: http://www.pengutronix.de/ X-IRC: #ptxdist @freenode X-Accept-Language: de,en X-Accept-Content-Type: text/plain X-Uptime: 11:17:48 up 198 days, 17:04, 74 users, load average: 1.33, 2.66, 6.35 User-Agent: Mutt/1.5.21 (2010-09-15) X-SA-Exim-Connect-IP: 2001:6f8:1178:2:21e:67ff:fe11:9c5c X-SA-Exim-Mail-From: sha@pengutronix.de X-SA-Exim-Scanned: No (on metis.ext.pengutronix.de); SAEximRunCond expanded to false X-PTX-Original-Recipient: linux-kernel@vger.kernel.org Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1996 Lines: 64 On Sat, May 26, 2012 at 01:03:52PM -0300, Fabio Estevam wrote: > From: Fabio Estevam > > Prepare the clock before enabling it. > > Cc: Herbert Xu > Cc: > Signed-off-by: Fabio Estevam Acked-by: Sascha Hauer > --- > Changes since v1: > - Add missing clk_disable_unprepare(clk) in the remove path > > drivers/char/hw_random/mxc-rnga.c | 6 +++--- > 1 files changed, 3 insertions(+), 3 deletions(-) > > diff --git a/drivers/char/hw_random/mxc-rnga.c b/drivers/char/hw_random/mxc-rnga.c > index 187c6be..430582c 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); > clk_put(clk); > > out: > @@ -215,7 +215,7 @@ static int __exit mxc_rnga_remove(struct platform_device *pdev) > > release_mem_region(res->start, resource_size(res)); > > - clk_disable(clk); > + clk_disable_unprepare(clk); > clk_put(clk); > > return 0; > -- > 1.7.1 > > -- 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 | -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/