]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - drivers/power/apm_power.c
PCI: make CPU list affinity visible
[linux-2.6-omap-h63xx.git] / drivers / power / apm_power.c
index a832a9a05c66e8f469340978c52ad4db36c2ce08..936bae560fa1f730255bde8a94c9493c953efdfd 100644 (file)
@@ -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;
@@ -133,6 +133,9 @@ static int do_calculate_time(int status, enum apm_source source)
                        return -1;
        }
 
+       if (!I.intval)
+               return 0;
+
        switch (source) {
        case SOURCE_CHARGE:
                full_prop = POWER_SUPPLY_PROP_CHARGE_FULL;