From: Jeremy Fitzhardinge Date: Sat, 3 Dec 2011 03:06:10 +0000 (-0800) Subject: hid-input/battery: power-supply type really *is* a battery X-Git-Tag: v3.3-rc1~123^2^2~2 X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=b3ca3839f344aa469e6f53c8bbb633e5ab9b96c8;p=karo-tx-linux.git hid-input/battery: power-supply type really *is* a battery It just isn't a battery which is powering the computer. upower needs a more nuanced understanding of this. Signed-off-by: Jeremy Fitzhardinge --- diff --git a/drivers/hid/hid-input.c b/drivers/hid/hid-input.c index 771ff5df5742..ceade58b8027 100644 --- a/drivers/hid/hid-input.c +++ b/drivers/hid/hid-input.c @@ -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;