summaryrefslogtreecommitdiff
path: root/drivers/hid/wacom.h
diff options
context:
space:
mode:
authorBenjamin Tissoires <benjamin.tissoires@redhat.com>2016-07-13 16:06:11 (GMT)
committerJiri Kosina <jkosina@suse.cz>2016-08-05 11:39:19 (GMT)
commit589e5060206b97a9602534d19d53264d35cd969f (patch)
tree4188bd6d26b9f19f1101eeac5c83714f261a348b /drivers/hid/wacom.h
parent97f5541fc0c7ed107103e6f87a6522f5327ab4b0 (diff)
downloadlinux-589e5060206b97a9602534d19d53264d35cd969f.tar.xz
HID: wacom: leds: actually release the LEDs on disconnect
There is a bug (?) in devm_led_classdev_register() in which its increments the refcount of the parent. If the parent is an input device, that means the ref count never reaches 0 when devm_input_device_release() gets called. This means that the LEDs and all the devres resources attached to the input device are not released. Manually force the release of the group so that the leds are released once we are done using them. Signed-off-by: Benjamin Tissoires <benjamin.tissoires@redhat.com> Acked-by: Ping Cheng <pingc@wacom.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
Diffstat (limited to 'drivers/hid/wacom.h')
-rw-r--r--drivers/hid/wacom.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/hid/wacom.h b/drivers/hid/wacom.h
index 0c498c4..9159dd3 100644
--- a/drivers/hid/wacom.h
+++ b/drivers/hid/wacom.h
@@ -130,6 +130,7 @@ struct wacom_group_leds {
u8 select; /* status led selector (0..3) */
struct wacom_led *leds;
unsigned int count;
+ struct device *dev;
};
struct wacom_battery {