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>] [day] [month] [year] [list]
Message-ID: <50AF4819.6020509@antcom.de>
Date:	Fri, 23 Nov 2012 10:55:37 +0100
From:	Roland Stigge <stigge@...com.de>
To:	Alexandre Pereira da Silva <aletes.xgr@...il.com>
CC:	Alban Bedel <alban.bedel@...onic-design.de>,
	LKML <linux-kernel@...r.kernel.org>,
	Thierry Reding <thierry.reding@...onic-design.de>
Subject: Re: [PATCH 2/3] pwm: lpc32xx - Properly disable the clock on device
 remove

On 11/22/2012 11:31 PM, Alexandre Pereira da Silva wrote:
> Em 14/11/2012 09:58, "Alban Bedel" <alban.bedel@...onic-design.de> escreveu:
>>
>> A single clock is used for all PWMs meaning the clock ref count might
>> be between 0 and N when remove() is called. Instead of a single
>> clk_disable() call pwm_disable() on each PWM, that ensure that
>> clk_disable() is called for each PWM that were still enabled.
>>
>> Signed-off-by: Alban Bedel <alban.bedel@...onic-design.de>
> 
> Acked-by: Alexandre Pereira da Silva <aletes.xgr@...il.com>

Some style fixes necessary below (Thierry will take care of it), otherwise:

Acked-by: Roland Stigge <stigge@...com.de>

> 
>> ---
>>  drivers/pwm/pwm-lpc32xx.c |    5 ++++-
>>  1 files changed, 4 insertions(+), 1 deletions(-)
>>
>> diff --git a/drivers/pwm/pwm-lpc32xx.c b/drivers/pwm/pwm-lpc32xx.c
>> index 03ec3ff..f45ce2c 100644
>> --- a/drivers/pwm/pwm-lpc32xx.c
>> +++ b/drivers/pwm/pwm-lpc32xx.c
>> @@ -136,8 +136,11 @@ static int lpc32xx_pwm_probe(struct platform_device
> *pdev)
>>  static int __devexit lpc32xx_pwm_remove(struct platform_device *pdev)
>>  {
>>         struct lpc32xx_pwm_chip *lpc32xx = platform_get_drvdata(pdev);
>> +       int i;
>> +
>> +       for (i = 0 ; i < lpc32xx->chip.npwm ; i += 1)
>> +               pwm_disable(&lpc32xx->chip.pwms[i]);
>>
>> -       clk_disable(lpc32xx->clk);
>>         return pwmchip_remove(&lpc32xx->chip);
>>  }
>>
>> --
>> 1.7.0.4
>>
> 

--
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

Powered by Openwall GNU/*/Linux Powered by OpenVZ