Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=ad40e68bf5c54831cd6b2199fd24d616bac179f7
Commit:     ad40e68bf5c54831cd6b2199fd24d616bac179f7
Parent:     f194d132e4971111f85c18c96067acffb13cee6d
Author:     Andrey Borzenkov <[EMAIL PROTECTED]>
AuthorDate: Sat Nov 10 20:02:49 2007 +0300
Committer:  Len Brown <[EMAIL PROTECTED]>
CommitDate: Thu Dec 6 22:29:22 2007 -0500

    ACPI: battery: fix ACPI battery technology reporting
    
    At least some systems report technology information with trailing spaces:
    
    {pts/1}% cat -E /var/tmp/bat/2.6.23 | grep type
    battery type:            Li-ION  $
    
    Use strncasecmp to compare model string to skip trailing part
    
    Signed-off-by: Andrey Borzenkov <[EMAIL PROTECTED]>
    Acked-by: Alexey Starikovskiy <[EMAIL PROTECTED]>
    Signed-off-by: Len Brown <[EMAIL PROTECTED]>
---
 drivers/acpi/battery.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/acpi/battery.c b/drivers/acpi/battery.c
index 7d6be23..8f7505d 100644
--- a/drivers/acpi/battery.c
+++ b/drivers/acpi/battery.c
@@ -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;
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to