Commit dd3181a7 authored by Benjamin Tissoires's avatar Benjamin Tissoires Committed by Dmitry Torokhov

Input: wacom - register power device at the HID level

Use the HID device as the parent for the power device when dealing with
a wireless receiver.
Removes one more usb dependency and does not break user space.
Signed-off-by: default avatarBenjamin Tissoires <benjamin.tissoires@redhat.com>
Reviewed-by: default avatarJason Gerecke <killertofu@gmail.com>
Tested-by: default avatarJason Gerecke <killertofu@gmail.com>
Signed-off-by: default avatarDmitry Torokhov <dmitry.torokhov@gmail.com>
parent 4451e088
......@@ -966,12 +966,12 @@ static int wacom_initialize_battery(struct wacom *wacom)
wacom->battery.type = POWER_SUPPLY_TYPE_BATTERY;
wacom->battery.use_for_apm = 0;
error = power_supply_register(&wacom->usbdev->dev,
error = power_supply_register(&wacom->hdev->dev,
&wacom->battery);
if (!error)
power_supply_powers(&wacom->battery,
&wacom->usbdev->dev);
&wacom->hdev->dev);
}
return error;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment