diff options
author | Jens Axboe <jens.axboe@oracle.com> | 2009-05-22 14:25:34 -0400 |
---|---|---|
committer | Jens Axboe <jens.axboe@oracle.com> | 2009-05-22 14:25:34 -0400 |
commit | e4b636366c00738b9609cda307014d71b1225b7f (patch) | |
tree | 760b67b3624eda62e943e48ce93635c30a5b47bf /drivers/hid | |
parent | b9ed7252d219c1c663944bf03846eabb515dbe75 (diff) | |
parent | 279e677faa775ad16e75c32e1bf4a37f8158bc61 (diff) |
Merge branch 'master' into for-2.6.31
Conflicts:
drivers/block/hd.c
drivers/block/mg_disk.c
Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
Diffstat (limited to 'drivers/hid')
-rw-r--r-- | drivers/hid/hid-apple.c | 2 | ||||
-rw-r--r-- | drivers/hid/hid-core.c | 4 | ||||
-rw-r--r-- | drivers/hid/hid-ids.h | 6 | ||||
-rw-r--r-- | drivers/hid/hid-lg.c | 2 | ||||
-rw-r--r-- | drivers/hid/hidraw.c | 12 | ||||
-rw-r--r-- | drivers/hid/usbhid/hid-core.c | 4 | ||||
-rw-r--r-- | drivers/hid/usbhid/hid-quirks.c | 3 |
7 files changed, 26 insertions, 7 deletions
diff --git a/drivers/hid/hid-apple.c b/drivers/hid/hid-apple.c index 7359d9d88e46..acbce5745b0c 100644 --- a/drivers/hid/hid-apple.c +++ b/drivers/hid/hid-apple.c | |||
@@ -151,7 +151,7 @@ static int hidinput_apple_event(struct hid_device *hid, struct input_dev *input, | |||
151 | if (fnmode) { | 151 | if (fnmode) { |
152 | int do_translate; | 152 | int do_translate; |
153 | 153 | ||
154 | trans = apple_find_translation((hid->product < 0x220 || | 154 | trans = apple_find_translation((hid->product < 0x21d || |
155 | hid->product >= 0x300) ? | 155 | hid->product >= 0x300) ? |
156 | powerbook_fn_keys : apple_fn_keys, | 156 | powerbook_fn_keys : apple_fn_keys, |
157 | usage->code); | 157 | usage->code); |
diff --git a/drivers/hid/hid-core.c b/drivers/hid/hid-core.c index 5746a5903bce..8551693d645f 100644 --- a/drivers/hid/hid-core.c +++ b/drivers/hid/hid-core.c | |||
@@ -1293,6 +1293,7 @@ static const struct hid_device_id hid_blacklist[] = { | |||
1293 | { HID_USB_DEVICE(USB_VENDOR_ID_LOGITECH, USB_DEVICE_ID_LOGITECH_FORCE3D_PRO) }, | 1293 | { HID_USB_DEVICE(USB_VENDOR_ID_LOGITECH, USB_DEVICE_ID_LOGITECH_FORCE3D_PRO) }, |
1294 | { HID_USB_DEVICE(USB_VENDOR_ID_LOGITECH, USB_DEVICE_ID_LOGITECH_MOMO_WHEEL) }, | 1294 | { HID_USB_DEVICE(USB_VENDOR_ID_LOGITECH, USB_DEVICE_ID_LOGITECH_MOMO_WHEEL) }, |
1295 | { HID_USB_DEVICE(USB_VENDOR_ID_LOGITECH, USB_DEVICE_ID_LOGITECH_MOMO_WHEEL2) }, | 1295 | { HID_USB_DEVICE(USB_VENDOR_ID_LOGITECH, USB_DEVICE_ID_LOGITECH_MOMO_WHEEL2) }, |
1296 | { HID_USB_DEVICE(USB_VENDOR_ID_LOGITECH, USB_DEVICE_ID_LOGITECH_G25_WHEEL) }, | ||
1296 | { HID_USB_DEVICE(USB_VENDOR_ID_LOGITECH, USB_DEVICE_ID_LOGITECH_RUMBLEPAD2) }, | 1297 | { HID_USB_DEVICE(USB_VENDOR_ID_LOGITECH, USB_DEVICE_ID_LOGITECH_RUMBLEPAD2) }, |
1297 | { HID_USB_DEVICE(USB_VENDOR_ID_MICROSOFT, USB_DEVICE_ID_SIDEWINDER_GV) }, | 1298 | { HID_USB_DEVICE(USB_VENDOR_ID_MICROSOFT, USB_DEVICE_ID_SIDEWINDER_GV) }, |
1298 | { HID_USB_DEVICE(USB_VENDOR_ID_MICROSOFT, USB_DEVICE_ID_MS_NE4K) }, | 1299 | { HID_USB_DEVICE(USB_VENDOR_ID_MICROSOFT, USB_DEVICE_ID_MS_NE4K) }, |
@@ -1824,6 +1825,9 @@ int hid_check_keys_pressed(struct hid_device *hid) | |||
1824 | struct hid_input *hidinput; | 1825 | struct hid_input *hidinput; |
1825 | int i; | 1826 | int i; |
1826 | 1827 | ||
1828 | if (!(hid->claimed & HID_CLAIMED_INPUT)) | ||
1829 | return 0; | ||
1830 | |||
1827 | list_for_each_entry(hidinput, &hid->inputs, list) { | 1831 | list_for_each_entry(hidinput, &hid->inputs, list) { |
1828 | for (i = 0; i < BITS_TO_LONGS(KEY_MAX); i++) | 1832 | for (i = 0; i < BITS_TO_LONGS(KEY_MAX); i++) |
1829 | if (hidinput->input->key[i]) | 1833 | if (hidinput->input->key[i]) |
diff --git a/drivers/hid/hid-ids.h b/drivers/hid/hid-ids.h index bdeda4c7cc13..4d5ee2bbc62b 100644 --- a/drivers/hid/hid-ids.h +++ b/drivers/hid/hid-ids.h | |||
@@ -113,6 +113,11 @@ | |||
113 | #define USB_VENDOR_ID_BERKSHIRE 0x0c98 | 113 | #define USB_VENDOR_ID_BERKSHIRE 0x0c98 |
114 | #define USB_DEVICE_ID_BERKSHIRE_PCWD 0x1140 | 114 | #define USB_DEVICE_ID_BERKSHIRE_PCWD 0x1140 |
115 | 115 | ||
116 | #define USB_VENDOR_ID_CH 0x068e | ||
117 | #define USB_DEVICE_ID_CH_PRO_PEDALS 0x00f2 | ||
118 | #define USB_DEVICE_ID_CH_COMBATSTICK 0x00f4 | ||
119 | #define USB_DEVICE_ID_CH_FLIGHT_SIM_YOKE 0x00ff | ||
120 | |||
116 | #define USB_VENDOR_ID_CHERRY 0x046a | 121 | #define USB_VENDOR_ID_CHERRY 0x046a |
117 | #define USB_DEVICE_ID_CHERRY_CYMOTION 0x0023 | 122 | #define USB_DEVICE_ID_CHERRY_CYMOTION 0x0023 |
118 | 123 | ||
@@ -292,6 +297,7 @@ | |||
292 | #define USB_DEVICE_ID_LOGITECH_FORCE3D_PRO 0xc286 | 297 | #define USB_DEVICE_ID_LOGITECH_FORCE3D_PRO 0xc286 |
293 | #define USB_DEVICE_ID_LOGITECH_WHEEL 0xc294 | 298 | #define USB_DEVICE_ID_LOGITECH_WHEEL 0xc294 |
294 | #define USB_DEVICE_ID_LOGITECH_MOMO_WHEEL 0xc295 | 299 | #define USB_DEVICE_ID_LOGITECH_MOMO_WHEEL 0xc295 |
300 | #define USB_DEVICE_ID_LOGITECH_G25_WHEEL 0xc299 | ||
295 | #define USB_DEVICE_ID_LOGITECH_ELITE_KBD 0xc30a | 301 | #define USB_DEVICE_ID_LOGITECH_ELITE_KBD 0xc30a |
296 | #define USB_DEVICE_ID_S510_RECEIVER 0xc50c | 302 | #define USB_DEVICE_ID_S510_RECEIVER 0xc50c |
297 | #define USB_DEVICE_ID_S510_RECEIVER_2 0xc517 | 303 | #define USB_DEVICE_ID_S510_RECEIVER_2 0xc517 |
diff --git a/drivers/hid/hid-lg.c b/drivers/hid/hid-lg.c index 7b80cb694982..7afbaa0efd18 100644 --- a/drivers/hid/hid-lg.c +++ b/drivers/hid/hid-lg.c | |||
@@ -297,6 +297,8 @@ static const struct hid_device_id lg_devices[] = { | |||
297 | .driver_data = LG_FF }, | 297 | .driver_data = LG_FF }, |
298 | { HID_USB_DEVICE(USB_VENDOR_ID_LOGITECH, USB_DEVICE_ID_LOGITECH_MOMO_WHEEL2), | 298 | { HID_USB_DEVICE(USB_VENDOR_ID_LOGITECH, USB_DEVICE_ID_LOGITECH_MOMO_WHEEL2), |
299 | .driver_data = LG_FF }, | 299 | .driver_data = LG_FF }, |
300 | { HID_USB_DEVICE(USB_VENDOR_ID_LOGITECH, USB_DEVICE_ID_LOGITECH_G25_WHEEL), | ||
301 | .driver_data = LG_FF }, | ||
300 | { HID_USB_DEVICE(USB_VENDOR_ID_LOGITECH, USB_DEVICE_ID_LOGITECH_RUMBLEPAD2), | 302 | { HID_USB_DEVICE(USB_VENDOR_ID_LOGITECH, USB_DEVICE_ID_LOGITECH_RUMBLEPAD2), |
301 | .driver_data = LG_FF2 }, | 303 | .driver_data = LG_FF2 }, |
302 | { } | 304 | { } |
diff --git a/drivers/hid/hidraw.c b/drivers/hid/hidraw.c index e263d4731179..00ccf4b1985d 100644 --- a/drivers/hid/hidraw.c +++ b/drivers/hid/hidraw.c | |||
@@ -285,8 +285,10 @@ static long hidraw_ioctl(struct file *file, unsigned int cmd, | |||
285 | 285 | ||
286 | if (_IOC_NR(cmd) == _IOC_NR(HIDIOCGRAWNAME(0))) { | 286 | if (_IOC_NR(cmd) == _IOC_NR(HIDIOCGRAWNAME(0))) { |
287 | int len; | 287 | int len; |
288 | if (!hid->name) | 288 | if (!hid->name) { |
289 | return 0; | 289 | ret = 0; |
290 | break; | ||
291 | } | ||
290 | len = strlen(hid->name) + 1; | 292 | len = strlen(hid->name) + 1; |
291 | if (len > _IOC_SIZE(cmd)) | 293 | if (len > _IOC_SIZE(cmd)) |
292 | len = _IOC_SIZE(cmd); | 294 | len = _IOC_SIZE(cmd); |
@@ -297,8 +299,10 @@ static long hidraw_ioctl(struct file *file, unsigned int cmd, | |||
297 | 299 | ||
298 | if (_IOC_NR(cmd) == _IOC_NR(HIDIOCGRAWPHYS(0))) { | 300 | if (_IOC_NR(cmd) == _IOC_NR(HIDIOCGRAWPHYS(0))) { |
299 | int len; | 301 | int len; |
300 | if (!hid->phys) | 302 | if (!hid->phys) { |
301 | return 0; | 303 | ret = 0; |
304 | break; | ||
305 | } | ||
302 | len = strlen(hid->phys) + 1; | 306 | len = strlen(hid->phys) + 1; |
303 | if (len > _IOC_SIZE(cmd)) | 307 | if (len > _IOC_SIZE(cmd)) |
304 | len = _IOC_SIZE(cmd); | 308 | len = _IOC_SIZE(cmd); |
diff --git a/drivers/hid/usbhid/hid-core.c b/drivers/hid/usbhid/hid-core.c index 4306cb1b8ce5..ac8049b5f1e9 100644 --- a/drivers/hid/usbhid/hid-core.c +++ b/drivers/hid/usbhid/hid-core.c | |||
@@ -662,8 +662,8 @@ void usbhid_close(struct hid_device *hid) | |||
662 | spin_lock_irq(&usbhid->lock); | 662 | spin_lock_irq(&usbhid->lock); |
663 | if (!--hid->open) { | 663 | if (!--hid->open) { |
664 | spin_unlock_irq(&usbhid->lock); | 664 | spin_unlock_irq(&usbhid->lock); |
665 | hid_cancel_delayed_stuff(usbhid); | ||
665 | usb_kill_urb(usbhid->urbin); | 666 | usb_kill_urb(usbhid->urbin); |
666 | flush_scheduled_work(); | ||
667 | usbhid->intf->needs_remote_wakeup = 0; | 667 | usbhid->intf->needs_remote_wakeup = 0; |
668 | } else { | 668 | } else { |
669 | spin_unlock_irq(&usbhid->lock); | 669 | spin_unlock_irq(&usbhid->lock); |
@@ -898,7 +898,7 @@ static int usbhid_parse(struct hid_device *hid) | |||
898 | goto err; | 898 | goto err; |
899 | } | 899 | } |
900 | 900 | ||
901 | hid->quirks = quirks; | 901 | hid->quirks |= quirks; |
902 | 902 | ||
903 | return 0; | 903 | return 0; |
904 | err: | 904 | err: |
diff --git a/drivers/hid/usbhid/hid-quirks.c b/drivers/hid/usbhid/hid-quirks.c index 4391717d2519..d8f7423f363e 100644 --- a/drivers/hid/usbhid/hid-quirks.c +++ b/drivers/hid/usbhid/hid-quirks.c | |||
@@ -50,6 +50,9 @@ static const struct hid_blacklist { | |||
50 | { USB_VENDOR_ID_ATEN, USB_DEVICE_ID_ATEN_2PORTKVM, HID_QUIRK_NOGET }, | 50 | { USB_VENDOR_ID_ATEN, USB_DEVICE_ID_ATEN_2PORTKVM, HID_QUIRK_NOGET }, |
51 | { USB_VENDOR_ID_ATEN, USB_DEVICE_ID_ATEN_4PORTKVM, HID_QUIRK_NOGET }, | 51 | { USB_VENDOR_ID_ATEN, USB_DEVICE_ID_ATEN_4PORTKVM, HID_QUIRK_NOGET }, |
52 | { USB_VENDOR_ID_ATEN, USB_DEVICE_ID_ATEN_4PORTKVMC, HID_QUIRK_NOGET }, | 52 | { USB_VENDOR_ID_ATEN, USB_DEVICE_ID_ATEN_4PORTKVMC, HID_QUIRK_NOGET }, |
53 | { USB_VENDOR_ID_CH, USB_DEVICE_ID_CH_COMBATSTICK, HID_QUIRK_NOGET }, | ||
54 | { USB_VENDOR_ID_CH, USB_DEVICE_ID_CH_FLIGHT_SIM_YOKE, HID_QUIRK_NOGET }, | ||
55 | { USB_VENDOR_ID_CH, USB_DEVICE_ID_CH_PRO_PEDALS, HID_QUIRK_NOGET }, | ||
53 | { USB_VENDOR_ID_DMI, USB_DEVICE_ID_DMI_ENC, HID_QUIRK_NOGET }, | 56 | { USB_VENDOR_ID_DMI, USB_DEVICE_ID_DMI_ENC, HID_QUIRK_NOGET }, |
54 | { USB_VENDOR_ID_ELO, USB_DEVICE_ID_ELO_TS2700, HID_QUIRK_NOGET }, | 57 | { USB_VENDOR_ID_ELO, USB_DEVICE_ID_ELO_TS2700, HID_QUIRK_NOGET }, |
55 | { USB_VENDOR_ID_SUN, USB_DEVICE_ID_RARITAN_KVM_DONGLE, HID_QUIRK_NOGET }, | 58 | { USB_VENDOR_ID_SUN, USB_DEVICE_ID_RARITAN_KVM_DONGLE, HID_QUIRK_NOGET }, |