]> git.karo-electronics.de Git - linux-beck.git/commitdiff
power: generic-adc-battery: Fix power_supply_property returned value
authorNicolas Saenz Julienne <nicolassaenzj@gmail.com>
Sun, 8 Mar 2015 19:21:20 +0000 (19:21 +0000)
committerSebastian Reichel <sre@kernel.org>
Mon, 9 Mar 2015 01:51:36 +0000 (02:51 +0100)
The POWER_SUPPLY_PROP_STATUS case in gab_get_property() wasn't providing any
value.

Signed-off-by: Nicolas Saenz Julienne <nicolassaenzj@gmail.com>
Signed-off-by: Sebastian Reichel <sre@kernel.org>
drivers/power/generic-adc-battery.c

index d72733e4f93aa68a8fe12b24b2bc2d9e6bc9bd32..0a566ac3eefd30edad102aa00a14ce037b7b6c7f 100644 (file)
@@ -159,7 +159,7 @@ static int gab_get_property(struct power_supply *psy,
 
        switch (psp) {
        case POWER_SUPPLY_PROP_STATUS:
-               gab_get_status(adc_bat);
+               val->intval = gab_get_status(adc_bat);
                break;
        case POWER_SUPPLY_PROP_CHARGE_EMPTY_DESIGN:
                val->intval = 0;