From: David Herrmann <dh.herrmann@googlemail.com>
To: linux-input@vger.kernel.org
Cc: jkosina@suse.cz, David Herrmann <dh.herrmann@googlemail.com>
Subject: [PATCH 3/3] HID: wiimote: explicitly claim hid devices with HID_CLAIMED_OTHER
Date: Sun, 15 Jul 2012 20:21:49 +0200 [thread overview]
Message-ID: <1342376509-7228-4-git-send-email-dh.herrmann@googlemail.com> (raw)
In-Reply-To: <1342376509-7228-1-git-send-email-dh.herrmann@googlemail.com>
We allow hidraw to be loaded on wiimote devices but if a kernel is
compiled without hidraw, calling hid_hw_start() will always fail as no
driver claims the device. Therefore, we now explicitly set
HID_CLAIMED_OTHER so the hid-core will allow loading the device even if no
generic driver claimed it. The wiimote driver will correctly handle the
device, anyway.
Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
---
drivers/hid/hid-wiimote-core.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/hid/hid-wiimote-core.c b/drivers/hid/hid-wiimote-core.c
index 84e2fbe..39154ff9 100644
--- a/drivers/hid/hid-wiimote-core.c
+++ b/drivers/hid/hid-wiimote-core.c
@@ -1189,6 +1189,7 @@ static int wiimote_hid_probe(struct hid_device *hdev,
goto err;
}
+ hdev->claimed |= HID_CLAIMED_OTHER;
ret = hid_hw_start(hdev, HID_CONNECT_HIDRAW);
if (ret) {
hid_err(hdev, "HW start failed\n");
--
1.7.11.2
prev parent reply other threads:[~2012-07-15 18:22 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-07-15 18:21 [PATCH 0/3] HID: Add HID_CLAIMED_OTHER device flag David Herrmann
2012-07-15 18:21 ` [PATCH 1/3] HID: Add HID_CLAIMED_OTHER for non-generic drivers David Herrmann
2012-07-15 18:21 ` [PATCH 2/3] HID: picolcd: explicitly claim hid devices with HID_CLAIMED_OTHER David Herrmann
2012-07-15 18:21 ` David Herrmann [this message]
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=1342376509-7228-4-git-send-email-dh.herrmann@googlemail.com \
--to=dh.herrmann@googlemail.com \
--cc=jkosina@suse.cz \
--cc=linux-input@vger.kernel.org \
/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