]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
hid-input/battery: power-supply type really *is* a battery
authorJeremy Fitzhardinge <jeremy@goop.org>
Sat, 3 Dec 2011 03:06:10 +0000 (19:06 -0800)
committerJeremy Fitzhardinge <jeremy@goop.org>
Sun, 8 Jan 2012 07:30:39 +0000 (18:30 +1100)
It just isn't a battery which is powering the computer.  upower needs
a more nuanced understanding of this.

Signed-off-by: Jeremy Fitzhardinge <jeremy@goop.org>
drivers/hid/hid-input.c

index 771ff5df574230847b26f7682875b051498f6209..ceade58b8027e1b39ffbb6dbd12a1a2e1b623d00 100644 (file)
@@ -368,7 +368,7 @@ static bool hidinput_setup_battery(struct hid_device *dev, unsigned report_type,
        if (battery->name == NULL)
                goto out;
 
-       battery->type = POWER_SUPPLY_TYPE_USB;
+       battery->type = POWER_SUPPLY_TYPE_BATTERY;
        battery->properties = hidinput_battery_props;
        battery->num_properties = ARRAY_SIZE(hidinput_battery_props);
        battery->use_for_apm = 0;