mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-29 19:21:31 -04:00
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]> Acked-by: Lars-Peter Clausen <[email protected]> Signed-off-by: Anton Vorontsov <[email protected]>
This commit is contained in:
parent
9903e62700
commit
ecb7a8ebdc
1 changed files with 1 additions and 1 deletions
|
|
@ -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:
|
||||
|
|
|
|||
Loading…
Reference in a new issue