summaryrefslogtreecommitdiffstats
path: root/drivers/hid/hid-input-quirks.c
diff options
context:
space:
mode:
authorJiri Kosina <jkosina@suse.cz>2007-11-26 13:26:33 +0100
committerJiri Kosina <jkosina@suse.cz>2008-01-28 14:51:21 +0100
commit628edcde87592a7ac6e72b555bb03ea265bcfbd2 (patch)
tree8ccffe1a294b0cb31f54cf0b5858b445a16dcd9c /drivers/hid/hid-input-quirks.c
parent9a15c99714ca229dd0b894e200fd96daf14f32fb (diff)
HID: proper handling of MS 4k and 6k devices
This removes ugly macros IS_* to distinguish devices that need special handling in hid-input, and establish proper quirks for them. Signed-off-by: Jiri Kosina <jkosina@suse.cz>
Diffstat (limited to 'drivers/hid/hid-input-quirks.c')
-rw-r--r--drivers/hid/hid-input-quirks.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/drivers/hid/hid-input-quirks.c b/drivers/hid/hid-input-quirks.c
index 7018be3a5a4..fbe8b6de1a6 100644
--- a/drivers/hid/hid-input-quirks.c
+++ b/drivers/hid/hid-input-quirks.c
@@ -349,9 +349,6 @@ int hidinput_mapping_quirks(struct hid_usage *usage,
return 0;
}
-#define IS_BTC8193(x) (x->vendor == 0x0518 && x->product == 0x0002)
-#define IS_MS_KB(x) (x->vendor == 0x045e && (x->product == 0x00db || x->product == 0x00f9))
-
void hidinput_event_quirks(struct hid_device *hid, struct hid_field *field, struct hid_usage *usage, __s32 value)
{
struct input_dev *input;
@@ -392,7 +389,8 @@ void hidinput_event_quirks(struct hid_device *hid, struct hid_field *field, stru
return;
/* Handling MS keyboards special buttons */
- if (IS_MS_KB(hid) && usage->hid == (HID_UP_MSVENDOR | 0xff05)) {
+ if (hid->quirks & HID_QUIRK_MICROSOFT_KEYS &&
+ usage->hid == (HID_UP_MSVENDOR | 0xff05)) {
int key = 0;
static int last_key = 0;
switch (value) {