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:	Tue, 22 May 2012 12:30:31 +0200
From:	Lars-Peter Clausen <lars@...afoo.de>
To:	Pritesh Raithatha <praithatha@...dia.com>
CC:	cbouatmailru@...il.com, axel.lin@...il.com,
	cabarnes@...esign-llc.com, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] gpio-charger: use cansleep version of gpio_set_value

On 05/22/2012 10:50 AM, Pritesh Raithatha wrote:
> Context of gpio_charger_get_property is sleepable so we should
> use gpio_set_value_cansleep instead of gpio_set_value.
> 
> It will remove WARN_ON incase of using gpio from i2c-to-gpio
> expander like pca953x.
> 
> Signed-off-by: Pritesh Raithatha <praithatha@...dia.com>

Looks good,

Acked-by: Lars-Peter Clausen <lars@...afoo.de>

> ---
>  drivers/power/gpio-charger.c |    2 +-
>  1 files changed, 1 insertions(+), 1 deletions(-)
> 
> diff --git a/drivers/power/gpio-charger.c b/drivers/power/gpio-charger.c
> index 8672c91..cb2aa31 100644
> --- a/drivers/power/gpio-charger.c
> +++ b/drivers/power/gpio-charger.c
> @@ -54,7 +54,7 @@ static int gpio_charger_get_property(struct power_supply *psy,
>  
>  	switch (psp) {
>  	case POWER_SUPPLY_PROP_ONLINE:
> -		val->intval = gpio_get_value(pdata->gpio);
> +		val->intval = gpio_get_value_cansleep(pdata->gpio);
>  		val->intval ^= pdata->gpio_active_low;
>  		break;
>  	default:

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