X-Git-Url: http://plrg.eecs.uci.edu/git/?a=blobdiff_plain;f=drivers%2Fpower%2Fapm_power.c;h=dc628cb2e762803b6f3374d33a99feae5b08640c;hb=092493929b2fe750b9d6d394d3709f812081c219;hp=a4892275659dc02ffb1d12b85d0774a86bda8b08;hpb=6598b60fd56ba5e915a001cc4e307880a94d19ae;p=firefly-linux-kernel-4.4.55.git diff --git a/drivers/power/apm_power.c b/drivers/power/apm_power.c index a4892275659d..dc628cb2e762 100644 --- a/drivers/power/apm_power.c +++ b/drivers/power/apm_power.c @@ -78,7 +78,7 @@ static void find_main_battery(void) main_battery = NULL; bp.main = main_battery; - error = class_for_each_device(power_supply_class, &bp, + error = class_for_each_device(power_supply_class, NULL, &bp, __find_main_battery); if (error) { main_battery = bp.main; @@ -233,6 +233,7 @@ static int calculate_capacity(enum apm_source source) empty_design_prop = POWER_SUPPLY_PROP_ENERGY_EMPTY_DESIGN; now_prop = POWER_SUPPLY_PROP_ENERGY_NOW; avg_prop = POWER_SUPPLY_PROP_ENERGY_AVG; + break; case SOURCE_VOLTAGE: full_prop = POWER_SUPPLY_PROP_VOLTAGE_MAX; empty_prop = POWER_SUPPLY_PROP_VOLTAGE_MIN;