lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Wed, 2 Jan 2013 14:38:43 +0100
From:	Thierry Reding <thierry.reding@...onic-design.de>
To:	Philip Avinash <avinashphilip@...com>
Cc:	tony@...mide.com, paul@...an.com, linux@....linux.org.uk,
	b-cousson@...com, hvaibhav@...com, anilkumar@...com,
	linux-kernel@...r.kernel.org, linux-omap@...r.kernel.org,
	linux-arm-kernel@...ts.infradead.org, nsekhar@...com,
	gururaja.hebbar@...com, vaibhav.bedia@...com
Subject: Re: [PATCH 3/7] pwm: pwm-tiehrpwm: Update the clock handling of
 pwm-tiehrpwm driver

On Wed, Jan 02, 2013 at 06:54:50PM +0530, Philip Avinash wrote:
> The clock framework has changed and it's now better to invoke
> clock_prepare_enable() and clk_disable_unprepare() rather than the
> legacy clk_enable() and clk_disable() calls. This patch converts the
> pwm-tiehrpwm driver to the new framework.
> 
> Signed-off-by: Philip Avinash <avinashphilip@...com>
> Cc: Thierry Reding <thierry.reding@...onic-design.de>
> ---
> In 3.8-rc1, common clock frame work support added to AM335x.
> 
>  drivers/pwm/pwm-tiehrpwm.c |    4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/pwm/pwm-tiehrpwm.c b/drivers/pwm/pwm-tiehrpwm.c
> index 72a6dd4..af6f162 100644
> --- a/drivers/pwm/pwm-tiehrpwm.c
> +++ b/drivers/pwm/pwm-tiehrpwm.c
> @@ -341,7 +341,7 @@ static int ehrpwm_pwm_enable(struct pwm_chip *chip, struct pwm_device *pwm)
>  	configure_polarity(pc, pwm->hwpwm);
>  
>  	/* Enable TBCLK before enabling PWM device */
> -	clk_enable(pc->tbclk);
> +	clk_prepare_enable(pc->tbclk);

I apparently didn't catch this before, but maybe it would be useful to
check the return value here to make sure we only proceed if the clock
can actually be enabled.

Thierry

Content of type "application/pgp-signature" skipped

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ