Skip to content

Commit 50bb6d8

Browse files
AlanSternJiri Kosina
authored andcommitted
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>
1 parent 73e6d6c commit 50bb6d8

3 files changed

Lines changed: 0 additions & 50 deletions

File tree

‎drivers/hid/usbhid/hid-core.c‎

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1470,18 +1470,13 @@ static int __init hid_init(void)
14701470
retval = usbhid_quirks_init(quirks_param);
14711471
if (retval)
14721472
goto usbhid_quirks_init_fail;
1473-
retval = hiddev_init();
1474-
if (retval)
1475-
goto hiddev_init_fail;
14761473
retval = usb_register(&hid_driver);
14771474
if (retval)
14781475
goto usb_register_fail;
14791476
printk(KERN_INFO KBUILD_MODNAME ": " DRIVER_DESC "\n");
14801477

14811478
return 0;
14821479
usb_register_fail:
1483-
hiddev_exit();
1484-
hiddev_init_fail:
14851480
usbhid_quirks_exit();
14861481
usbhid_quirks_init_fail:
14871482
hid_unregister_driver(&hid_usb_driver);
@@ -1494,7 +1489,6 @@ static int __init hid_init(void)
14941489
static void __exit hid_exit(void)
14951490
{
14961491
usb_deregister(&hid_driver);
1497-
hiddev_exit();
14981492
usbhid_quirks_exit();
14991493
hid_unregister_driver(&hid_usb_driver);
15001494
destroy_workqueue(resumption_waker);

‎drivers/hid/usbhid/hiddev.c‎

Lines changed: 0 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -67,8 +67,6 @@ struct hiddev_list {
6767
struct mutex thread_lock;
6868
};
6969

70-
static struct usb_driver hiddev_driver;
71-
7270
/*
7371
* Find a report, given the report's type and ID. The ID can be specified
7472
* indirectly by REPORT_ID_FIRST (which returns the first report of the given
@@ -925,41 +923,3 @@ void hiddev_disconnect(struct hid_device *hid)
925923
kfree(hiddev);
926924
}
927925
}
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-
}

‎include/linux/hiddev.h‎

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -226,8 +226,6 @@ void hiddev_disconnect(struct hid_device *);
226226
void hiddev_hid_event(struct hid_device *hid, struct hid_field *field,
227227
struct hid_usage *usage, __s32 value);
228228
void hiddev_report_event(struct hid_device *hid, struct hid_report *report);
229-
int __init hiddev_init(void);
230-
void hiddev_exit(void);
231229
#else
232230
static inline int hiddev_connect(struct hid_device *hid,
233231
unsigned int force)
@@ -236,8 +234,6 @@ static inline void hiddev_disconnect(struct hid_device *hid) { }
236234
static inline void hiddev_hid_event(struct hid_device *hid, struct hid_field *field,
237235
struct hid_usage *usage, __s32 value) { }
238236
static inline void hiddev_report_event(struct hid_device *hid, struct hid_report *report) { }
239-
static inline int hiddev_init(void) { return 0; }
240-
static inline void hiddev_exit(void) { }
241237
#endif
242238

243239
#endif

0 commit comments

Comments
 (0)