]> err.no Git - linux-2.6/blobdiff - drivers/acpi/battery.c
Merge branch 'for-linus' of git://git390.osdl.marist.edu/pub/scm/linux-2.6
[linux-2.6] / drivers / acpi / battery.c
index b871f289dd3075438cd54e6ee2b3cd81929606fe..8f7505d304b58790c077e4bc257380eccf523117 100644 (file)
@@ -125,7 +125,7 @@ static int acpi_battery_technology(struct acpi_battery *battery)
                return POWER_SUPPLY_TECHNOLOGY_NiMH;
        if (!strcasecmp("LION", battery->type))
                return POWER_SUPPLY_TECHNOLOGY_LION;
-       if (!strcasecmp("LI-ION", battery->type))
+       if (!strncasecmp("LI-ION", battery->type, 6))
                return POWER_SUPPLY_TECHNOLOGY_LION;
        if (!strcasecmp("LiP", battery->type))
                return POWER_SUPPLY_TECHNOLOGY_LIPO;
@@ -153,6 +153,8 @@ static int acpi_battery_get_property(struct power_supply *psy,
                        val->intval = POWER_SUPPLY_STATUS_CHARGING;
                else if (battery->state == 0)
                        val->intval = POWER_SUPPLY_STATUS_FULL;
+               else
+                       val->intval = POWER_SUPPLY_STATUS_UNKNOWN;
                break;
        case POWER_SUPPLY_PROP_PRESENT:
                val->intval = acpi_battery_present(battery);