HID: wacom: leds: dynamically allocate LED groups
authorBenjamin Tissoires <[email protected]>
Wed, 13 Jul 2016 16:06:00 +0000 (18:06 +0200)
committerJiri Kosina <[email protected]>
Fri, 5 Aug 2016 11:39:15 +0000 (13:39 +0200)
commita50aac7193f18a5a997588556f1212b0d1ba029b
tree1132bcbeec19d5d9b19aa5baf80346c2c179d100
parent1c817c83e8ccea5f710d3c0d38edcfd362654ba2
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 <[email protected]>
Acked-by: Ping Cheng <[email protected]>
Signed-off-by: Jiri Kosina <[email protected]>
drivers/hid/wacom.h
drivers/hid/wacom_sys.c
drivers/hid/wacom_wac.c