]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
HID: wacom: close the wireless receiver on remove()
authorBenjamin Tissoires <benjamin.tissoires@redhat.com>
Fri, 12 Feb 2016 16:27:45 +0000 (17:27 +0100)
committerJiri Kosina <jkosina@suse.cz>
Tue, 16 Feb 2016 19:40:38 +0000 (20:40 +0100)
rmmod/insmod the wacom.ko module does not work for the receiver because
it was not previously closed. Now, we can hack with the wireless receiver
without having to unplug/replug it.

Signed-off-by: Benjamin Tissoires <benjamin.tissoires@redhat.com>
Acked-by: Ping Cheng <pingc@wacom.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
drivers/hid/wacom_sys.c

index 9a410351d56a27327cfb68a155e31ce552d7f84e..68a560957871c5a497e4e3d0229ca03dc359d8da 100644 (file)
@@ -1853,6 +1853,11 @@ fail_parse:
 static void wacom_remove(struct hid_device *hdev)
 {
        struct wacom *wacom = hid_get_drvdata(hdev);
+       struct wacom_wac *wacom_wac = &wacom->wacom_wac;
+       struct wacom_features *features = &wacom_wac->features;
+
+       if (features->device_type & WACOM_DEVICETYPE_WL_MONITOR)
+               hid_hw_close(hdev);
 
        hid_hw_stop(hdev);