Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

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

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
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -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;