mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Benjamin Tissoires <benjamin.tissoires@redhat.com>
To: Jiri Kosina <jikos@kernel.org>, linux-input@vger.kernel.org
Cc: Ping Cheng <pinglinux@gmail.com>,
	Jason Gerecke <killertofu@gmail.com>,
	Aaron Skomra <skomra@gmail.com>,
	linux-kernel@vger.kernel.org
Subject: [PATCH 6/6] HID: wacom: close the wireless receiver on remove()
Date: Fri, 12 Feb 2016 17:27:45 +0100	[thread overview]
Message-ID: <1455294465-13694-7-git-send-email-benjamin.tissoires@redhat.com> (raw)
In-Reply-To: <1455294465-13694-1-git-send-email-benjamin.tissoires@redhat.com>

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>
---
 drivers/hid/wacom_sys.c | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/drivers/hid/wacom_sys.c b/drivers/hid/wacom_sys.c
index 9a41035..68a5609 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);
 
-- 
2.5.0

  parent reply	other threads:[~2016-02-12 16:28 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-02-12 16:27 [PATCH 0/6] HID: wacom: cleanup Benjamin Tissoires
2016-02-12 16:27 ` [PATCH 1/6] HID: wacom: break out wacom_intuos_get_tool_type Benjamin Tissoires
2016-02-12 16:27 ` [PATCH 2/6] HID: wacom: break out parsing of device and registering of input Benjamin Tissoires
2016-02-12 16:27 ` [PATCH 3/6] HID: wacom: move down wireless_work() Benjamin Tissoires
2016-02-12 16:27 ` [PATCH 4/6] HID: wacom: reuse wacom_parse_and_register() in wireless_work Benjamin Tissoires
2016-02-12 16:27 ` [PATCH 5/6] HID: wacom: cleanup input devices Benjamin Tissoires
2016-02-12 16:27 ` Benjamin Tissoires [this message]
2016-02-16 17:14 ` [PATCH 0/6] HID: wacom: cleanup Jiri Kosina
2016-02-16 19:42 ` Jiri Kosina

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1455294465-13694-7-git-send-email-benjamin.tissoires@redhat.com \
    --to=benjamin.tissoires@redhat.com \
    --cc=jikos@kernel.org \
    --cc=killertofu@gmail.com \
    --cc=linux-input@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=pinglinux@gmail.com \
    --cc=skomra@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®