forked from Minki/linux
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: 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>
This commit is contained in:
parent
4451e088cf
commit
dd3181a70c
@ -966,12 +966,12 @@ static int wacom_initialize_battery(struct wacom *wacom)
|
|||||||
wacom->battery.type = POWER_SUPPLY_TYPE_BATTERY;
|
wacom->battery.type = POWER_SUPPLY_TYPE_BATTERY;
|
||||||
wacom->battery.use_for_apm = 0;
|
wacom->battery.use_for_apm = 0;
|
||||||
|
|
||||||
error = power_supply_register(&wacom->usbdev->dev,
|
error = power_supply_register(&wacom->hdev->dev,
|
||||||
&wacom->battery);
|
&wacom->battery);
|
||||||
|
|
||||||
if (!error)
|
if (!error)
|
||||||
power_supply_powers(&wacom->battery,
|
power_supply_powers(&wacom->battery,
|
||||||
&wacom->usbdev->dev);
|
&wacom->hdev->dev);
|
||||||
}
|
}
|
||||||
|
|
||||||
return error;
|
return error;
|
||||||
|
Loading…
Reference in New Issue
Block a user