aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/hid
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/hid')
-rw-r--r--drivers/hid/hid-hyperv.c1
-rw-r--r--drivers/hid/hid-ids.h3
-rw-r--r--drivers/hid/hid-input.c9
-rw-r--r--drivers/hid/hid-wacom.c7
-rw-r--r--drivers/hid/hid-wiimote-core.c4
-rw-r--r--drivers/hid/usbhid/hid-quirks.c1
-rw-r--r--drivers/hid/usbhid/hiddev.c4
7 files changed, 20 insertions, 9 deletions
diff --git a/drivers/hid/hid-hyperv.c b/drivers/hid/hid-hyperv.c
index 0c33ae9cf0f0..406632472c1b 100644
--- a/drivers/hid/hid-hyperv.c
+++ b/drivers/hid/hid-hyperv.c
@@ -548,6 +548,7 @@ static int mousevsc_remove(struct hv_device *dev)
548 struct mousevsc_dev *input_dev = hv_get_drvdata(dev); 548 struct mousevsc_dev *input_dev = hv_get_drvdata(dev);
549 549
550 vmbus_close(dev->channel); 550 vmbus_close(dev->channel);
551 hid_hw_stop(input_dev->hid_device);
551 hid_destroy_device(input_dev->hid_device); 552 hid_destroy_device(input_dev->hid_device);
552 mousevsc_free_device(input_dev); 553 mousevsc_free_device(input_dev);
553 554
diff --git a/drivers/hid/hid-ids.h b/drivers/hid/hid-ids.h
index b8574cddd953..63552e30d0c3 100644
--- a/drivers/hid/hid-ids.h
+++ b/drivers/hid/hid-ids.h
@@ -59,6 +59,9 @@
59#define USB_VENDOR_ID_AIRCABLE 0x16CA 59#define USB_VENDOR_ID_AIRCABLE 0x16CA
60#define USB_DEVICE_ID_AIRCABLE1 0x1502 60#define USB_DEVICE_ID_AIRCABLE1 0x1502
61 61
62#define USB_VENDOR_ID_AIREN 0x1a2c
63#define USB_DEVICE_ID_AIREN_SLIMPLUS 0x0002
64
62#define USB_VENDOR_ID_ALCOR 0x058f 65#define USB_VENDOR_ID_ALCOR 0x058f
63#define USB_DEVICE_ID_ALCOR_USBRS232 0x9720 66#define USB_DEVICE_ID_ALCOR_USBRS232 0x9720
64 67
diff --git a/drivers/hid/hid-input.c b/drivers/hid/hid-input.c
index 9333d692a786..627850a54d34 100644
--- a/drivers/hid/hid-input.c
+++ b/drivers/hid/hid-input.c
@@ -986,8 +986,13 @@ void hidinput_hid_event(struct hid_device *hid, struct hid_field *field, struct
986 return; 986 return;
987 } 987 }
988 988
989 /* Ignore out-of-range values as per HID specification, section 5.10 */ 989 /*
990 if (value < field->logical_minimum || value > field->logical_maximum) { 990 * Ignore out-of-range values as per HID specification,
991 * section 5.10 and 6.2.25
992 */
993 if ((field->flags & HID_MAIN_ITEM_VARIABLE) &&
994 (value < field->logical_minimum ||
995 value > field->logical_maximum)) {
991 dbg_hid("Ignoring out-of-range value %x\n", value); 996 dbg_hid("Ignoring out-of-range value %x\n", value);
992 return; 997 return;
993 } 998 }
diff --git a/drivers/hid/hid-wacom.c b/drivers/hid/hid-wacom.c
index b47e58b52d9f..acab74cde727 100644
--- a/drivers/hid/hid-wacom.c
+++ b/drivers/hid/hid-wacom.c
@@ -531,7 +531,6 @@ static int wacom_probe(struct hid_device *hdev,
531 wdata->battery.type = POWER_SUPPLY_TYPE_BATTERY; 531 wdata->battery.type = POWER_SUPPLY_TYPE_BATTERY;
532 wdata->battery.use_for_apm = 0; 532 wdata->battery.use_for_apm = 0;
533 533
534 power_supply_powers(&wdata->battery, &hdev->dev);
535 534
536 ret = power_supply_register(&hdev->dev, &wdata->battery); 535 ret = power_supply_register(&hdev->dev, &wdata->battery);
537 if (ret) { 536 if (ret) {
@@ -540,6 +539,8 @@ static int wacom_probe(struct hid_device *hdev,
540 goto err_battery; 539 goto err_battery;
541 } 540 }
542 541
542 power_supply_powers(&wdata->battery, &hdev->dev);
543
543 wdata->ac.properties = wacom_ac_props; 544 wdata->ac.properties = wacom_ac_props;
544 wdata->ac.num_properties = ARRAY_SIZE(wacom_ac_props); 545 wdata->ac.num_properties = ARRAY_SIZE(wacom_ac_props);
545 wdata->ac.get_property = wacom_ac_get_property; 546 wdata->ac.get_property = wacom_ac_get_property;
@@ -547,14 +548,14 @@ static int wacom_probe(struct hid_device *hdev,
547 wdata->ac.type = POWER_SUPPLY_TYPE_MAINS; 548 wdata->ac.type = POWER_SUPPLY_TYPE_MAINS;
548 wdata->ac.use_for_apm = 0; 549 wdata->ac.use_for_apm = 0;
549 550
550 power_supply_powers(&wdata->battery, &hdev->dev);
551
552 ret = power_supply_register(&hdev->dev, &wdata->ac); 551 ret = power_supply_register(&hdev->dev, &wdata->ac);
553 if (ret) { 552 if (ret) {
554 hid_warn(hdev, 553 hid_warn(hdev,
555 "can't create ac battery attribute, err: %d\n", ret); 554 "can't create ac battery attribute, err: %d\n", ret);
556 goto err_ac; 555 goto err_ac;
557 } 556 }
557
558 power_supply_powers(&wdata->ac, &hdev->dev);
558#endif 559#endif
559 return 0; 560 return 0;
560 561
diff --git a/drivers/hid/hid-wiimote-core.c b/drivers/hid/hid-wiimote-core.c
index fc253b472f9d..cac3589b1ed5 100644
--- a/drivers/hid/hid-wiimote-core.c
+++ b/drivers/hid/hid-wiimote-core.c
@@ -1226,14 +1226,14 @@ static int wiimote_hid_probe(struct hid_device *hdev,
1226 wdata->battery.type = POWER_SUPPLY_TYPE_BATTERY; 1226 wdata->battery.type = POWER_SUPPLY_TYPE_BATTERY;
1227 wdata->battery.use_for_apm = 0; 1227 wdata->battery.use_for_apm = 0;
1228 1228
1229 power_supply_powers(&wdata->battery, &hdev->dev);
1230
1231 ret = power_supply_register(&wdata->hdev->dev, &wdata->battery); 1229 ret = power_supply_register(&wdata->hdev->dev, &wdata->battery);
1232 if (ret) { 1230 if (ret) {
1233 hid_err(hdev, "Cannot register battery device\n"); 1231 hid_err(hdev, "Cannot register battery device\n");
1234 goto err_battery; 1232 goto err_battery;
1235 } 1233 }
1236 1234
1235 power_supply_powers(&wdata->battery, &hdev->dev);
1236
1237 ret = wiimote_leds_create(wdata); 1237 ret = wiimote_leds_create(wdata);
1238 if (ret) 1238 if (ret)
1239 goto err_free; 1239 goto err_free;
diff --git a/drivers/hid/usbhid/hid-quirks.c b/drivers/hid/usbhid/hid-quirks.c
index c831af937481..57d4e1e1df48 100644
--- a/drivers/hid/usbhid/hid-quirks.c
+++ b/drivers/hid/usbhid/hid-quirks.c
@@ -54,6 +54,7 @@ static const struct hid_blacklist {
54 { USB_VENDOR_ID_PLAYDOTCOM, USB_DEVICE_ID_PLAYDOTCOM_EMS_USBII, HID_QUIRK_MULTI_INPUT }, 54 { USB_VENDOR_ID_PLAYDOTCOM, USB_DEVICE_ID_PLAYDOTCOM_EMS_USBII, HID_QUIRK_MULTI_INPUT },
55 { USB_VENDOR_ID_TOUCHPACK, USB_DEVICE_ID_TOUCHPACK_RTS, HID_QUIRK_MULTI_INPUT }, 55 { USB_VENDOR_ID_TOUCHPACK, USB_DEVICE_ID_TOUCHPACK_RTS, HID_QUIRK_MULTI_INPUT },
56 56
57 { USB_VENDOR_ID_AIREN, USB_DEVICE_ID_AIREN_SLIMPLUS, HID_QUIRK_NOGET },
57 { USB_VENDOR_ID_ATEN, USB_DEVICE_ID_ATEN_UC100KM, HID_QUIRK_NOGET }, 58 { USB_VENDOR_ID_ATEN, USB_DEVICE_ID_ATEN_UC100KM, HID_QUIRK_NOGET },
58 { USB_VENDOR_ID_ATEN, USB_DEVICE_ID_ATEN_CS124U, HID_QUIRK_NOGET }, 59 { USB_VENDOR_ID_ATEN, USB_DEVICE_ID_ATEN_CS124U, HID_QUIRK_NOGET },
59 { USB_VENDOR_ID_ATEN, USB_DEVICE_ID_ATEN_2PORTKVM, HID_QUIRK_NOGET }, 60 { USB_VENDOR_ID_ATEN, USB_DEVICE_ID_ATEN_2PORTKVM, HID_QUIRK_NOGET },
diff --git a/drivers/hid/usbhid/hiddev.c b/drivers/hid/usbhid/hiddev.c
index 7c297d305d5d..b1ec0e2aeb57 100644
--- a/drivers/hid/usbhid/hiddev.c
+++ b/drivers/hid/usbhid/hiddev.c
@@ -922,11 +922,11 @@ void hiddev_disconnect(struct hid_device *hid)
922 struct hiddev *hiddev = hid->hiddev; 922 struct hiddev *hiddev = hid->hiddev;
923 struct usbhid_device *usbhid = hid->driver_data; 923 struct usbhid_device *usbhid = hid->driver_data;
924 924
925 usb_deregister_dev(usbhid->intf, &hiddev_class);
926
925 mutex_lock(&hiddev->existancelock); 927 mutex_lock(&hiddev->existancelock);
926 hiddev->exist = 0; 928 hiddev->exist = 0;
927 929
928 usb_deregister_dev(usbhid->intf, &hiddev_class);
929
930 if (hiddev->open) { 930 if (hiddev->open) {
931 mutex_unlock(&hiddev->existancelock); 931 mutex_unlock(&hiddev->existancelock);
932 usbhid_close(hiddev->hid); 932 usbhid_close(hiddev->hid);