summaryrefslogtreecommitdiffstats
path: root/drivers/hid
diff options
context:
space:
mode:
authorBenjamin Tissoires <benjamin.tissoires@redhat.com>2016-02-12 17:27:45 +0100
committerJiri Kosina <jkosina@suse.cz>2016-02-16 20:40:38 +0100
commitf6205161782fa325152340c8fe47c1b90105cfbc (patch)
tree5868c0b3f8ded8861a447e0fa4d5247be76754aa /drivers/hid
parentHID: wacom: cleanup input devices (diff)
downloadlinux-f6205161782fa325152340c8fe47c1b90105cfbc.tar.xz
linux-f6205161782fa325152340c8fe47c1b90105cfbc.zip
HID: wacom: close the wireless receiver on remove()
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>
Diffstat (limited to 'drivers/hid')
-rw-r--r--drivers/hid/wacom_sys.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/drivers/hid/wacom_sys.c b/drivers/hid/wacom_sys.c
index 9a410351d56a..68a560957871 100644
--- a/drivers/hid/wacom_sys.c
+++ b/drivers/hid/wacom_sys.c
@@ -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);