Patchwork [09/13] hid: ntrig: Correct logic for quirks

login
register
mail settings
Submitter Henrik Rydberg
Date Sept. 10, 2010, 5:14 p.m.
Message ID <1284138859-32673-10-git-send-email-rydberg@euromail.se>
Download mbox | patch
Permalink /patch/64438/
State Accepted
Delegated to: Leann Ogasawara
Headers show

Comments

Henrik Rydberg - Sept. 10, 2010, 5:14 p.m.
The driver data is a bitmask, check for correct bits.

Signed-off-by: Henrik Rydberg <rydberg@euromail.se>
---
 drivers/hid/hid-ntrig.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

Patch

diff --git a/drivers/hid/hid-ntrig.c b/drivers/hid/hid-ntrig.c
index a2bd101..403503c 100644
--- a/drivers/hid/hid-ntrig.c
+++ b/drivers/hid/hid-ntrig.c
@@ -479,7 +479,7 @@  static int ntrig_probe(struct hid_device *hdev, const struct hid_device_id *id)
 	struct input_dev *input;
 	struct hid_report *report;
 
-	if (id->driver_data)
+	if (id->driver_data & NTRIG_DUPLICATE_USAGES)
 		hdev->quirks |= HID_QUIRK_MULTI_INPUT;
 
 	nd = kmalloc(sizeof(struct ntrig_data), GFP_KERNEL);