summaryrefslogtreecommitdiff
path: root/drivers/hid/wacom_wac.c
diff options
context:
space:
mode:
authorBenjamin Tissoires <benjamin.tissoires@redhat.com>2016-07-13 18:06:00 +0200
committerJiri Kosina <jkosina@suse.cz>2016-08-05 13:39:15 +0200
commita50aac7193f18a5a997588556f1212b0d1ba029b (patch)
tree1132bcbeec19d5d9b19aa5baf80346c2c179d100 /drivers/hid/wacom_wac.c
parent1c817c83e8ccea5f710d3c0d38edcfd362654ba2 (diff)
HID: wacom: leds: dynamically allocate LED groups
We need to add an action to ensure wacom->led.groups is null when wacom_led_control() gets called after the resources has been freed. This also prevents to send a LED command when there is no support from the device. 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_wac.c')
-rw-r--r--drivers/hid/wacom_wac.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/hid/wacom_wac.c b/drivers/hid/wacom_wac.c
index 3e2c90323326..932d3eec933b 100644
--- a/drivers/hid/wacom_wac.c
+++ b/drivers/hid/wacom_wac.c
@@ -808,7 +808,7 @@ static int wacom_remote_irq(struct wacom_wac *wacom_wac, size_t len)
for (i = 0; i < WACOM_MAX_REMOTES; i++) {
if (wacom_wac->serial[i] == serial)
- wacom->led.select[i] = touch_ring_mode;
+ wacom->led.groups[i].select = touch_ring_mode;
}
if (!wacom->battery &&