Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

HID: usbhid: remove unused hiddev_driver

Now that hiddev_driver isn't being used for anything, there's no
reason to keep it around. This patch (as1419) gets rid of it
entirely.

Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>

authored by

Alan Stern and committed by
Jiri Kosina
50bb6d84 73e6d6c6

-50
-6
drivers/hid/usbhid/hid-core.c
··· 1470 1470 retval = usbhid_quirks_init(quirks_param); 1471 1471 if (retval) 1472 1472 goto usbhid_quirks_init_fail; 1473 - retval = hiddev_init(); 1474 - if (retval) 1475 - goto hiddev_init_fail; 1476 1473 retval = usb_register(&hid_driver); 1477 1474 if (retval) 1478 1475 goto usb_register_fail; ··· 1477 1480 1478 1481 return 0; 1479 1482 usb_register_fail: 1480 - hiddev_exit(); 1481 - hiddev_init_fail: 1482 1483 usbhid_quirks_exit(); 1483 1484 usbhid_quirks_init_fail: 1484 1485 hid_unregister_driver(&hid_usb_driver); ··· 1489 1494 static void __exit hid_exit(void) 1490 1495 { 1491 1496 usb_deregister(&hid_driver); 1492 - hiddev_exit(); 1493 1497 usbhid_quirks_exit(); 1494 1498 hid_unregister_driver(&hid_usb_driver); 1495 1499 destroy_workqueue(resumption_waker);
-40
drivers/hid/usbhid/hiddev.c
··· 67 67 struct mutex thread_lock; 68 68 }; 69 69 70 - static struct usb_driver hiddev_driver; 71 - 72 70 /* 73 71 * Find a report, given the report's type and ID. The ID can be specified 74 72 * indirectly by REPORT_ID_FIRST (which returns the first report of the given ··· 922 924 } else { 923 925 kfree(hiddev); 924 926 } 925 - } 926 - 927 - /* Currently this driver is a USB driver. It's not a conventional one in 928 - * the sense that it doesn't probe at the USB level. Instead it waits to 929 - * be connected by HID through the hiddev_connect / hiddev_disconnect 930 - * routines. The reason to register as a USB device is to gain part of the 931 - * minor number space from the USB major. 932 - * 933 - * In theory, should the HID code be generalized to more than one physical 934 - * medium (say, IEEE 1384), this driver will probably need to register its 935 - * own major number, and in doing so, no longer need to register with USB. 936 - * At that point the probe routine and hiddev_driver struct below will no 937 - * longer be useful. 938 - */ 939 - 940 - 941 - /* We never attach in this manner, and rely on HID to connect us. This 942 - * is why there is no disconnect routine defined in the usb_driver either. 943 - */ 944 - static int hiddev_usbd_probe(struct usb_interface *intf, 945 - const struct usb_device_id *hiddev_info) 946 - { 947 - return -ENODEV; 948 - } 949 - 950 - static /* const */ struct usb_driver hiddev_driver = { 951 - .name = "hiddev", 952 - .probe = hiddev_usbd_probe, 953 - }; 954 - 955 - int __init hiddev_init(void) 956 - { 957 - return usb_register(&hiddev_driver); 958 - } 959 - 960 - void hiddev_exit(void) 961 - { 962 - usb_deregister(&hiddev_driver); 963 927 }
-4
include/linux/hiddev.h
··· 226 226 void hiddev_hid_event(struct hid_device *hid, struct hid_field *field, 227 227 struct hid_usage *usage, __s32 value); 228 228 void hiddev_report_event(struct hid_device *hid, struct hid_report *report); 229 - int __init hiddev_init(void); 230 - void hiddev_exit(void); 231 229 #else 232 230 static inline int hiddev_connect(struct hid_device *hid, 233 231 unsigned int force) ··· 234 236 static inline void hiddev_hid_event(struct hid_device *hid, struct hid_field *field, 235 237 struct hid_usage *usage, __s32 value) { } 236 238 static inline void hiddev_report_event(struct hid_device *hid, struct hid_report *report) { } 237 - static inline int hiddev_init(void) { return 0; } 238 - static inline void hiddev_exit(void) { } 239 239 #endif 240 240 241 241 #endif