summaryrefslogtreecommitdiffstats
path: root/drivers/power/gpio-charger.c
diff options
context:
space:
mode:
authorPritesh Raithatha <praithatha@nvidia.com>2012-05-22 10:50:04 +0200
committerAnton Vorontsov <cbouatmailru@gmail.com>2012-06-20 05:48:37 +0200
commitecb7a8ebdc4b063715d5a37919f9118c3f1031a8 (patch)
tree9aa3d1378c9d08bdf389d74b2638a695bd800ef2 /drivers/power/gpio-charger.c
parentbq27x00_battery: Add support for power average and health properties (diff)
downloadlinux-ecb7a8ebdc4b063715d5a37919f9118c3f1031a8.tar.xz
linux-ecb7a8ebdc4b063715d5a37919f9118c3f1031a8.zip
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 <praithatha@nvidia.com> Acked-by: Lars-Peter Clausen <lars@metafoo.de> Signed-off-by: Anton Vorontsov <cbouatmailru@gmail.com>
Diffstat (limited to 'drivers/power/gpio-charger.c')
-rw-r--r--drivers/power/gpio-charger.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/power/gpio-charger.c b/drivers/power/gpio-charger.c
index 8672c9177dd7..cb2aa3195687 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: