From: Benjamin Tissoires <benjamin.tissoi...@redhat.com>

When the LED class gets removed, it actually tries to reset the LED.
However, the device being disconnected, the set_report fails.

Previously, the attempt to cut lose this last event was through unsetting
the HID drvdata, but it was not working properly. Simply reset the LED
groups to NULL makes a more efficient solution.

Signed-off-by: Benjamin Tissoires <benjamin.tissoi...@redhat.com>
Acked-by: Jason Gerecke <jason.gere...@wacom.com>
Signed-off-by: Jiri Kosina <jkos...@suse.cz>
[jason.gere...@wacom.com: Imported into input-wacom repository (c0265a9)]
Signed-off-by: Jason Gerecke <jason.gere...@wacom.com>
[aaron.sko...@wacom.com: Backported from input-wacom repository (fa2a43d)]
Signed-off-by: Aaron Armstrong Skomra <aaron.sko...@wacom.com>
---
 3.17/wacom_sys.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/3.17/wacom_sys.c b/3.17/wacom_sys.c
index 89cc6a4..e03b69c 100644
--- a/3.17/wacom_sys.c
+++ b/3.17/wacom_sys.c
@@ -2353,6 +2353,8 @@ static void wacom_remove(struct hid_device *hdev)
 #endif
        wacom_remove_shared_data(wacom);
 
+       /* make sure we don't trigger the LEDs */
+       wacom_led_groups_release(wacom);
        wacom_release_resources(wacom);
 
        hid_set_drvdata(hdev, NULL);
-- 
2.7.4


------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, SlashDot.org! http://sdm.link/slashdot
_______________________________________________
Linuxwacom-devel mailing list
Linuxwacom-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linuxwacom-devel

Reply via email to