Skip to content

Commit

Permalink
Input: wacom - register power device at the HID level
Browse files Browse the repository at this point in the history
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: Benjamin Tissoires <benjamin.tissoires@redhat.com>
Reviewed-by: Jason Gerecke <killertofu@gmail.com>
Tested-by: Jason Gerecke <killertofu@gmail.com>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
  • Loading branch information
Benjamin Tissoires authored and Dmitry Torokhov committed Jul 26, 2014
1 parent 4451e08 commit dd3181a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions drivers/input/tablet/wacom_sys.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit dd3181a

Please sign in to comment.