gpio-charger: use cansleep version of gpio_set_value
PATCH 1/1 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 <[email protected]>
--- drivers/power/gpio-charger.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
drivers/power/gpio-charger.c +1 -1
@@ -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 :
Signature · 1 line
1.7.1
Quoted 7 lines · Pritesh Raithatha
Context of
gpio_charger_get_propertyis sleepable so we should usegpio_set_value_cansleepinstead ofgpio_set_value.It will remove
WARN_ONincase of using gpio from i2c-to-gpio expander like pca953x.Signed-off-by Pritesh Raithatha <[email protected]>
Looks good,
Quoted 17 lines
--- drivers/power/gpio-charger.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)drivers/power/gpio-charger.c +1
-1@@ -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 :
Anton Vorontsov
AppliedQuoted 4 lines · Lars-Peter Clausen
Quoted 3 lines · Pritesh Raithatha
Context of
gpio_charger_get_propertyis sleepable so we should usegpio_set_value_cansleepinstead ofgpio_set_value.
Quoted 8 lines
Quoted 4 lines
It will remove
WARN_ONincase of using gpio from i2c-to-gpio expander like pca953x.Signed-off-by Pritesh Raithatha <[email protected]>Looks good,
Applied, thanks!
Signature · 2 lines
Anton Vorontsov Email: [email protected]