Skip to content

Commit ed70da7

Browse files
hadessjigpu
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]> [[email protected]: Imported into input-wacom repository (6ff1cae2e30a)] Signed-off-by: Joshua Dickens <[email protected]>
1 parent 176ff66 commit ed70da7

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

4.5/wacom_sys.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1833,7 +1833,7 @@ static int __wacom_initialize_battery(struct wacom *wacom,
18331833
bat_desc->get_property = wacom_battery_get_property;
18341834
sprintf(battery->bat_name, "wacom_battery_%ld", n);
18351835
bat_desc->name = battery->bat_name;
1836-
bat_desc->type = POWER_SUPPLY_TYPE_USB;
1836+
bat_desc->type = POWER_SUPPLY_TYPE_BATTERY;
18371837
bat_desc->use_for_apm = 0;
18381838

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

0 commit comments

Comments
 (0)