aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/hid
diff options
context:
space:
mode:
authorBastien Nocera <hadess@hadess.net>2022-04-07 13:54:06 +0200
committerJiri Kosina <jkosina@suse.cz>2022-04-21 09:59:40 +0200
commit6ff1cae2e30a79265bcce85f617663c480936ab0 (patch)
tree7b6c3f22438c3a09bece242fa14453a3c3678e88 /drivers/hid
parentHID: wacom: Adding Support for new usages (diff)
downloadlinux-dev-6ff1cae2e30a79265bcce85f617663c480936ab0.tar.xz
linux-dev-6ff1cae2e30a79265bcce85f617663c480936ab0.zip
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 <hadess@hadess.net> Acked-by: Jason Gerecke <jason.gerecke@wacom.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
Diffstat (limited to 'drivers/hid')
-rw-r--r--drivers/hid/wacom_sys.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/hid/wacom_sys.c b/drivers/hid/wacom_sys.c
index 066c567dbaa2..620fe74f5676 100644
--- a/drivers/hid/wacom_sys.c
+++ b/drivers/hid/wacom_sys.c
@@ -1777,7 +1777,7 @@ static int __wacom_initialize_battery(struct wacom *wacom,
bat_desc->get_property = wacom_battery_get_property;
sprintf(battery->bat_name, "wacom_battery_%ld", n);
bat_desc->name = battery->bat_name;
- bat_desc->type = POWER_SUPPLY_TYPE_USB;
+ bat_desc->type = POWER_SUPPLY_TYPE_BATTERY;
bat_desc->use_for_apm = 0;
ps_bat = devm_power_supply_register(dev, bat_desc, &psy_cfg);