Instead of using an ugly workaround to make hid_hw_start() correctly
initialize the device, we now explicitely set HID_CLAIMED_OTHER before
initializing the hid device. This tells the hid-core to accept the device
even if no generic hid driver gets loaded.

Signed-off-by: David Herrmann <[email protected]>
---
 drivers/hid/hid-picolcd.c | 7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)

diff --git a/drivers/hid/hid-picolcd.c b/drivers/hid/hid-picolcd.c
index 45c3433..36a11a8 100644
--- a/drivers/hid/hid-picolcd.c
+++ b/drivers/hid/hid-picolcd.c
@@ -2613,11 +2613,10 @@ static int picolcd_probe(struct hid_device *hdev,
                goto err_cleanup_data;
        }
 
-       /* We don't use hidinput but hid_hw_start() fails if nothing is
-        * claimed. So spoof claimed input. */
-       hdev->claimed = HID_CLAIMED_INPUT;
+       /* Tell hid-core that we handle the device without the need of any
+        * generic hid-driver by setting the HID_CLAIMED_OTHER flag. */
+       hdev->claimed |= HID_CLAIMED_OTHER;
        error = hid_hw_start(hdev, 0);
-       hdev->claimed = 0;
        if (error) {
                hid_err(hdev, "hardware start failed\n");
                goto err_cleanup_data;
-- 
1.7.11.2

--
To unsubscribe from this list: send the line "unsubscribe linux-input" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to