From: Benjamin Tissoires Date: Thu, 24 Jul 2014 20:01:40 +0000 (-0700) Subject: Input: wacom - register power device at the HID level X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=dd3181a70cb73c4f40cfe33ecdd6260ff3fbf8cc;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git 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 Reviewed-by: Jason Gerecke Tested-by: Jason Gerecke Signed-off-by: Dmitry Torokhov --- diff --git a/drivers/input/tablet/wacom_sys.c b/drivers/input/tablet/wacom_sys.c index 8065bac5fcb3..b8710594185a 100644 --- a/drivers/input/tablet/wacom_sys.c +++ b/drivers/input/tablet/wacom_sys.c @@ -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;