aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlan Stern <stern@rowland.harvard.edu>2010-09-23 10:40:21 -0400
committerJiri Kosina <jkosina@suse.cz>2010-09-24 08:03:44 -0400
commit50bb6d8492ff0c3f204b263aff90d4a7ebf4dd90 (patch)
tree0e7855f26aff8da371e1680197bccebc86a5b4a2
parent73e6d6c6467771838c1fc6949e6768a12ed72464 (diff)
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>
-rw-r--r--drivers/hid/usbhid/hid-core.c6
-rw-r--r--drivers/hid/usbhid/hiddev.c40
-rw-r--r--include/linux/hiddev.h4
3 files changed, 0 insertions, 50 deletions
diff --git a/drivers/hid/usbhid/hid-core.c b/drivers/hid/usbhid/hid-core.c
index c90fbbdbffa2..7a778ac4c5cb 100644
--- a/drivers/hid/usbhid/hid-core.c
+++ b/drivers/hid/usbhid/hid-core.c
@@ -1470,9 +1470,6 @@ static int __init hid_init(void)
1470 retval = usbhid_quirks_init(quirks_param); 1470 retval = usbhid_quirks_init(quirks_param);
1471 if (retval) 1471 if (retval)
1472 goto usbhid_quirks_init_fail; 1472 goto usbhid_quirks_init_fail;
1473 retval = hiddev_init();
1474 if (retval)
1475 goto hiddev_init_fail;
1476 retval = usb_register(&hid_driver); 1473 retval = usb_register(&hid_driver);
1477 if (retval) 1474 if (retval)
1478 goto usb_register_fail; 1475 goto usb_register_fail;
@@ -1480,8 +1477,6 @@ static int __init hid_init(void)
1480 1477
1481 return 0; 1478 return 0;
1482usb_register_fail: 1479usb_register_fail:
1483 hiddev_exit();
1484hiddev_init_fail:
1485 usbhid_quirks_exit(); 1480 usbhid_quirks_exit();
1486usbhid_quirks_init_fail: 1481usbhid_quirks_init_fail:
1487 hid_unregister_driver(&hid_usb_driver); 1482 hid_unregister_driver(&hid_usb_driver);
@@ -1494,7 +1489,6 @@ no_queue:
1494static void __exit hid_exit(void) 1489static void __exit hid_exit(void)
1495{ 1490{
1496 usb_deregister(&hid_driver); 1491 usb_deregister(&hid_driver);
1497 hiddev_exit();
1498 usbhid_quirks_exit(); 1492 usbhid_quirks_exit();
1499 hid_unregister_driver(&hid_usb_driver); 1493 hid_unregister_driver(&hid_usb_driver);
1500 destroy_workqueue(resumption_waker); 1494 destroy_workqueue(resumption_waker);
diff --git a/drivers/hid/usbhid/hiddev.c b/drivers/hid/usbhid/hiddev.c
index 681e620eb95b..19ed90c8f503 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
70static 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
@@ -925,41 +923,3 @@ void hiddev_disconnect(struct hid_device *hid)
925 kfree(hiddev); 923 kfree(hiddev);
926 } 924 }
927} 925}
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 */
946static int hiddev_usbd_probe(struct usb_interface *intf,
947 const struct usb_device_id *hiddev_info)
948{
949 return -ENODEV;
950}
951
952static /* const */ struct usb_driver hiddev_driver = {
953 .name = "hiddev",
954 .probe = hiddev_usbd_probe,
955};
956
957int __init hiddev_init(void)
958{
959 return usb_register(&hiddev_driver);
960}
961
962void hiddev_exit(void)
963{
964 usb_deregister(&hiddev_driver);
965}
diff --git a/include/linux/hiddev.h b/include/linux/hiddev.h
index bb6f58baf319..a3f481a3063b 100644
--- a/include/linux/hiddev.h
+++ b/include/linux/hiddev.h
@@ -226,8 +226,6 @@ void hiddev_disconnect(struct hid_device *);
226void hiddev_hid_event(struct hid_device *hid, struct hid_field *field, 226void hiddev_hid_event(struct hid_device *hid, struct hid_field *field,
227 struct hid_usage *usage, __s32 value); 227 struct hid_usage *usage, __s32 value);
228void hiddev_report_event(struct hid_device *hid, struct hid_report *report); 228void hiddev_report_event(struct hid_device *hid, struct hid_report *report);
229int __init hiddev_init(void);
230void hiddev_exit(void);
231#else 229#else
232static inline int hiddev_connect(struct hid_device *hid, 230static inline int hiddev_connect(struct hid_device *hid,
233 unsigned int force) 231 unsigned int force)
@@ -236,8 +234,6 @@ static inline void hiddev_disconnect(struct hid_device *hid) { }
236static inline void hiddev_hid_event(struct hid_device *hid, struct hid_field *field, 234static inline void hiddev_hid_event(struct hid_device *hid, struct hid_field *field,
237 struct hid_usage *usage, __s32 value) { } 235 struct hid_usage *usage, __s32 value) { }
238static inline void hiddev_report_event(struct hid_device *hid, struct hid_report *report) { } 236static inline void hiddev_report_event(struct hid_device *hid, struct hid_report *report) { }
239static inline int hiddev_init(void) { return 0; }
240static inline void hiddev_exit(void) { }
241#endif 237#endif
242 238
243#endif 239#endif