Skip to content

Commit 6ff1cae

Browse files
hadessJiri Kosina
authored andcommitted
HID: wacom: Correct power_supply type
POWER_SUPPLY_TYPE_USB seems to only ever be used by USB ports that are used to charge the machine itself (so a "system" scope), like the single USB port on a phone, rather than devices. The wacom_sys driver is the only driver that sets its device battery as being a USB type, which doesn't seem correct based on its usage, so switch it to be a battery type like all the other USB-connected devices. Signed-off-by: Bastien Nocera <[email protected]> Acked-by: Jason Gerecke <[email protected]> Signed-off-by: Jiri Kosina <[email protected]>
1 parent 6d09085 commit 6ff1cae

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/hid/wacom_sys.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1777,7 +1777,7 @@ static int __wacom_initialize_battery(struct wacom *wacom,
17771777
bat_desc->get_property = wacom_battery_get_property;
17781778
sprintf(battery->bat_name, "wacom_battery_%ld", n);
17791779
bat_desc->name = battery->bat_name;
1780-
bat_desc->type = POWER_SUPPLY_TYPE_USB;
1780+
bat_desc->type = POWER_SUPPLY_TYPE_BATTERY;
17811781
bat_desc->use_for_apm = 0;
17821782

17831783
ps_bat = devm_power_supply_register(dev, bat_desc, &psy_cfg);

0 commit comments

Comments
 (0)