From: Pritesh Raithatha Date: Tue, 22 May 2012 08:50:04 +0000 (+0530) Subject: gpio-charger: Use cansleep version of gpio_set_value X-Git-Tag: v3.6-rc1~31^2~12 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=ecb7a8ebdc4b063715d5a37919f9118c3f1031a8;p=profile%2Fivi%2Fkernel-adaptation-intel-automotive.git gpio-charger: Use cansleep version of gpio_set_value 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 Acked-by: Lars-Peter Clausen Signed-off-by: Anton Vorontsov --- 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: