be2net: Fix memset() arg ordering.
[safe/jmp/linux-2.6] / drivers / power / pmu_battery.c
index 2fea4af..9c87ad5 100644 (file)
@@ -89,6 +89,8 @@ static int pmu_bat_get_property(struct power_supply *psy,
        case POWER_SUPPLY_PROP_STATUS:
                if (pbi->flags & PMU_BATT_CHARGING)
                        val->intval = POWER_SUPPLY_STATUS_CHARGING;
+               else if (pmu_power_flags & PMU_PWR_AC_PRESENT)
+                       val->intval = POWER_SUPPLY_STATUS_FULL;
                else
                        val->intval = POWER_SUPPLY_STATUS_DISCHARGING;
                break;
@@ -159,7 +161,7 @@ static int __init pmu_bat_init(void)
                if (!pbat)
                        break;
 
-               sprintf(pbat->name, "PMU battery %d", i);
+               sprintf(pbat->name, "PMU_battery_%d", i);
                pbat->bat.name = pbat->name;
                pbat->bat.properties = pmu_bat_props;
                pbat->bat.num_properties = ARRAY_SIZE(pmu_bat_props);
@@ -203,8 +205,6 @@ static void __exit pmu_bat_exit(void)
        }
        power_supply_unregister(&pmu_ac);
        platform_device_unregister(bat_pdev);
-
-       return;
 }
 
 module_init(pmu_bat_init);