diff options
Diffstat (limited to 'drivers/hid/usbhid')
-rw-r--r-- | drivers/hid/usbhid/hid-core.c | 7 | ||||
-rw-r--r-- | drivers/hid/usbhid/hid-quirks.c | 2 | ||||
-rw-r--r-- | drivers/hid/usbhid/hiddev.c | 41 |
3 files changed, 4 insertions, 46 deletions
diff --git a/drivers/hid/usbhid/hid-core.c b/drivers/hid/usbhid/hid-core.c index 599041a7f670..7a778ac4c5cb 100644 --- a/drivers/hid/usbhid/hid-core.c +++ b/drivers/hid/usbhid/hid-core.c | |||
@@ -810,6 +810,7 @@ static int usbhid_output_raw_report(struct hid_device *hid, __u8 *buf, size_t co | |||
810 | if (usbhid->urbout) { | 810 | if (usbhid->urbout) { |
811 | int actual_length; | 811 | int actual_length; |
812 | int skipped_report_id = 0; | 812 | int skipped_report_id = 0; |
813 | |||
813 | if (buf[0] == 0x0) { | 814 | if (buf[0] == 0x0) { |
814 | /* Don't send the Report ID */ | 815 | /* Don't send the Report ID */ |
815 | buf++; | 816 | buf++; |
@@ -1469,9 +1470,6 @@ static int __init hid_init(void) | |||
1469 | retval = usbhid_quirks_init(quirks_param); | 1470 | retval = usbhid_quirks_init(quirks_param); |
1470 | if (retval) | 1471 | if (retval) |
1471 | goto usbhid_quirks_init_fail; | 1472 | goto usbhid_quirks_init_fail; |
1472 | retval = hiddev_init(); | ||
1473 | if (retval) | ||
1474 | goto hiddev_init_fail; | ||
1475 | retval = usb_register(&hid_driver); | 1473 | retval = usb_register(&hid_driver); |
1476 | if (retval) | 1474 | if (retval) |
1477 | goto usb_register_fail; | 1475 | goto usb_register_fail; |
@@ -1479,8 +1477,6 @@ static int __init hid_init(void) | |||
1479 | 1477 | ||
1480 | return 0; | 1478 | return 0; |
1481 | usb_register_fail: | 1479 | usb_register_fail: |
1482 | hiddev_exit(); | ||
1483 | hiddev_init_fail: | ||
1484 | usbhid_quirks_exit(); | 1480 | usbhid_quirks_exit(); |
1485 | usbhid_quirks_init_fail: | 1481 | usbhid_quirks_init_fail: |
1486 | hid_unregister_driver(&hid_usb_driver); | 1482 | hid_unregister_driver(&hid_usb_driver); |
@@ -1493,7 +1489,6 @@ no_queue: | |||
1493 | static void __exit hid_exit(void) | 1489 | static void __exit hid_exit(void) |
1494 | { | 1490 | { |
1495 | usb_deregister(&hid_driver); | 1491 | usb_deregister(&hid_driver); |
1496 | hiddev_exit(); | ||
1497 | usbhid_quirks_exit(); | 1492 | usbhid_quirks_exit(); |
1498 | hid_unregister_driver(&hid_usb_driver); | 1493 | hid_unregister_driver(&hid_usb_driver); |
1499 | destroy_workqueue(resumption_waker); | 1494 | destroy_workqueue(resumption_waker); |
diff --git a/drivers/hid/usbhid/hid-quirks.c b/drivers/hid/usbhid/hid-quirks.c index 70da3181c8a0..f90e937b577f 100644 --- a/drivers/hid/usbhid/hid-quirks.c +++ b/drivers/hid/usbhid/hid-quirks.c | |||
@@ -36,6 +36,7 @@ static const struct hid_blacklist { | |||
36 | { USB_VENDOR_ID_DWAV, USB_DEVICE_ID_EGALAX_TOUCHCONTROLLER, HID_QUIRK_MULTI_INPUT | HID_QUIRK_NOGET }, | 36 | { USB_VENDOR_ID_DWAV, USB_DEVICE_ID_EGALAX_TOUCHCONTROLLER, HID_QUIRK_MULTI_INPUT | HID_QUIRK_NOGET }, |
37 | { USB_VENDOR_ID_DWAV, USB_DEVICE_ID_DWAV_EGALAX_MULTITOUCH, HID_QUIRK_MULTI_INPUT }, | 37 | { USB_VENDOR_ID_DWAV, USB_DEVICE_ID_DWAV_EGALAX_MULTITOUCH, HID_QUIRK_MULTI_INPUT }, |
38 | { USB_VENDOR_ID_MOJO, USB_DEVICE_ID_RETRO_ADAPTER, HID_QUIRK_MULTI_INPUT }, | 38 | { USB_VENDOR_ID_MOJO, USB_DEVICE_ID_RETRO_ADAPTER, HID_QUIRK_MULTI_INPUT }, |
39 | { USB_VENDOR_ID_TURBOX, USB_DEVICE_ID_TURBOX_TOUCHSCREEN_MOSART, HID_QUIRK_MULTI_INPUT }, | ||
39 | { USB_VENDOR_ID_HAPP, USB_DEVICE_ID_UGCI_DRIVING, HID_QUIRK_BADPAD | HID_QUIRK_MULTI_INPUT }, | 40 | { USB_VENDOR_ID_HAPP, USB_DEVICE_ID_UGCI_DRIVING, HID_QUIRK_BADPAD | HID_QUIRK_MULTI_INPUT }, |
40 | { USB_VENDOR_ID_HAPP, USB_DEVICE_ID_UGCI_FLYING, HID_QUIRK_BADPAD | HID_QUIRK_MULTI_INPUT }, | 41 | { USB_VENDOR_ID_HAPP, USB_DEVICE_ID_UGCI_FLYING, HID_QUIRK_BADPAD | HID_QUIRK_MULTI_INPUT }, |
41 | { USB_VENDOR_ID_HAPP, USB_DEVICE_ID_UGCI_FIGHTING, HID_QUIRK_BADPAD | HID_QUIRK_MULTI_INPUT }, | 42 | { USB_VENDOR_ID_HAPP, USB_DEVICE_ID_UGCI_FIGHTING, HID_QUIRK_BADPAD | HID_QUIRK_MULTI_INPUT }, |
@@ -62,6 +63,7 @@ static const struct hid_blacklist { | |||
62 | { USB_VENDOR_ID_CH, USB_DEVICE_ID_CH_FLIGHT_SIM_YOKE, HID_QUIRK_NOGET }, | 63 | { USB_VENDOR_ID_CH, USB_DEVICE_ID_CH_FLIGHT_SIM_YOKE, HID_QUIRK_NOGET }, |
63 | { USB_VENDOR_ID_CH, USB_DEVICE_ID_CH_PRO_PEDALS, HID_QUIRK_NOGET }, | 64 | { USB_VENDOR_ID_CH, USB_DEVICE_ID_CH_PRO_PEDALS, HID_QUIRK_NOGET }, |
64 | { USB_VENDOR_ID_CH, USB_DEVICE_ID_CH_3AXIS_5BUTTON_STICK, HID_QUIRK_NOGET }, | 65 | { USB_VENDOR_ID_CH, USB_DEVICE_ID_CH_3AXIS_5BUTTON_STICK, HID_QUIRK_NOGET }, |
66 | { USB_VENDOR_ID_CH, USB_DEVICE_ID_CH_AXIS_295, HID_QUIRK_NOGET }, | ||
65 | { USB_VENDOR_ID_DMI, USB_DEVICE_ID_DMI_ENC, HID_QUIRK_NOGET }, | 67 | { USB_VENDOR_ID_DMI, USB_DEVICE_ID_DMI_ENC, HID_QUIRK_NOGET }, |
66 | { USB_VENDOR_ID_ELO, USB_DEVICE_ID_ELO_TS2700, HID_QUIRK_NOGET }, | 68 | { USB_VENDOR_ID_ELO, USB_DEVICE_ID_ELO_TS2700, HID_QUIRK_NOGET }, |
67 | { USB_VENDOR_ID_PRODIGE, USB_DEVICE_ID_PRODIGE_CORDLESS, HID_QUIRK_NOGET }, | 69 | { USB_VENDOR_ID_PRODIGE, USB_DEVICE_ID_PRODIGE_CORDLESS, HID_QUIRK_NOGET }, |
diff --git a/drivers/hid/usbhid/hiddev.c b/drivers/hid/usbhid/hiddev.c index 681e620eb95b..fedd88df9a18 100644 --- a/drivers/hid/usbhid/hiddev.c +++ b/drivers/hid/usbhid/hiddev.c | |||
@@ -67,8 +67,6 @@ struct hiddev_list { | |||
67 | struct mutex thread_lock; | 67 | struct mutex thread_lock; |
68 | }; | 68 | }; |
69 | 69 | ||
70 | static struct usb_driver hiddev_driver; | ||
71 | |||
72 | /* | 70 | /* |
73 | * Find a report, given the report's type and ID. The ID can be specified | 71 | * Find a report, given the report's type and ID. The ID can be specified |
74 | * indirectly by REPORT_ID_FIRST (which returns the first report of the given | 72 | * indirectly by REPORT_ID_FIRST (which returns the first report of the given |
@@ -847,6 +845,7 @@ static const struct file_operations hiddev_fops = { | |||
847 | #ifdef CONFIG_COMPAT | 845 | #ifdef CONFIG_COMPAT |
848 | .compat_ioctl = hiddev_compat_ioctl, | 846 | .compat_ioctl = hiddev_compat_ioctl, |
849 | #endif | 847 | #endif |
848 | .llseek = noop_llseek, | ||
850 | }; | 849 | }; |
851 | 850 | ||
852 | static char *hiddev_devnode(struct device *dev, mode_t *mode) | 851 | static char *hiddev_devnode(struct device *dev, mode_t *mode) |
@@ -925,41 +924,3 @@ void hiddev_disconnect(struct hid_device *hid) | |||
925 | kfree(hiddev); | 924 | kfree(hiddev); |
926 | } | 925 | } |
927 | } | 926 | } |
928 | |||
929 | /* Currently this driver is a USB driver. It's not a conventional one in | ||
930 | * the sense that it doesn't probe at the USB level. Instead it waits to | ||
931 | * be connected by HID through the hiddev_connect / hiddev_disconnect | ||
932 | * routines. The reason to register as a USB device is to gain part of the | ||
933 | * minor number space from the USB major. | ||
934 | * | ||
935 | * In theory, should the HID code be generalized to more than one physical | ||
936 | * medium (say, IEEE 1384), this driver will probably need to register its | ||
937 | * own major number, and in doing so, no longer need to register with USB. | ||
938 | * At that point the probe routine and hiddev_driver struct below will no | ||
939 | * longer be useful. | ||
940 | */ | ||
941 | |||
942 | |||
943 | /* We never attach in this manner, and rely on HID to connect us. This | ||
944 | * is why there is no disconnect routine defined in the usb_driver either. | ||
945 | */ | ||
946 | static int hiddev_usbd_probe(struct usb_interface *intf, | ||
947 | const struct usb_device_id *hiddev_info) | ||
948 | { | ||
949 | return -ENODEV; | ||
950 | } | ||
951 | |||
952 | static /* const */ struct usb_driver hiddev_driver = { | ||
953 | .name = "hiddev", | ||
954 | .probe = hiddev_usbd_probe, | ||
955 | }; | ||
956 | |||
957 | int __init hiddev_init(void) | ||
958 | { | ||
959 | return usb_register(&hiddev_driver); | ||
960 | } | ||
961 | |||
962 | void hiddev_exit(void) | ||
963 | { | ||
964 | usb_deregister(&hiddev_driver); | ||
965 | } | ||