git: a4777bb4373d - main - Remove unused hidraw_devclass.

From: John Baldwin <jhb_at_FreeBSD.org>
Date: Fri, 06 May 2022 23:25:02 UTC
The branch main has been updated by jhb:

URL: https://cgit.FreeBSD.org/src/commit/?id=a4777bb4373d85268b390ab44d94890f6480042d

commit a4777bb4373d85268b390ab44d94890f6480042d
Author:     John Baldwin <jhb@FreeBSD.org>
AuthorDate: 2022-05-06 22:46:57 +0000
Commit:     John Baldwin <jhb@FreeBSD.org>
CommitDate: 2022-05-06 22:46:57 +0000

    Remove unused hidraw_devclass.
---
 sys/dev/hid/hid.c        | 4 ----
 sys/dev/hid/hid.h        | 3 ---
 sys/dev/hid/hidraw.c     | 6 +-----
 sys/dev/usb/input/uhid.c | 2 +-
 4 files changed, 2 insertions(+), 13 deletions(-)

diff --git a/sys/dev/hid/hid.c b/sys/dev/hid/hid.c
index bd5fc79ff0d9..0ed663f99f88 100644
--- a/sys/dev/hid/hid.c
+++ b/sys/dev/hid/hid.c
@@ -58,10 +58,6 @@ SYSCTL_NODE(_hw, OID_AUTO, hid, CTLFLAG_RW, 0, "HID debugging");
 SYSCTL_INT(_hw_hid, OID_AUTO, debug, CTLFLAG_RWTUN,
     &hid_debug, 0, "Debug level");
 
-#ifdef HIDRAW_MAKE_UHID_ALIAS
-devclass_t hidraw_devclass;
-#endif
-
 static void hid_clear_local(struct hid_item *);
 static uint8_t hid_get_byte(struct hid_data *s, const uint16_t wSize);
 
diff --git a/sys/dev/hid/hid.h b/sys/dev/hid/hid.h
index df822fcddffb..1832af0a4ffb 100644
--- a/sys/dev/hid/hid.h
+++ b/sys/dev/hid/hid.h
@@ -194,9 +194,6 @@
 #define	HID_MAX_AUTO_QUIRK	8	/* maximum number of dynamic quirks */
 #define	HID_PNP_ID_SIZE		20	/* includes null terminator */
 
-/* Share unit number pool between uhid and hidraw */
-extern devclass_t hidraw_devclass;
-
 /* Declare global HID debug variable. */
 extern int hid_debug;
 
diff --git a/sys/dev/hid/hidraw.c b/sys/dev/hid/hidraw.c
index 25b41693b7f3..c8e36a186aaf 100644
--- a/sys/dev/hid/hidraw.c
+++ b/sys/dev/hid/hidraw.c
@@ -984,11 +984,7 @@ static driver_t hidraw_driver = {
 	sizeof(struct hidraw_softc)
 };
 
-#ifndef HIDRAW_MAKE_UHID_ALIAS
-devclass_t hidraw_devclass;
-#endif
-
-DRIVER_MODULE(hidraw, hidbus, hidraw_driver, hidraw_devclass, NULL, 0);
+DRIVER_MODULE(hidraw, hidbus, hidraw_driver, NULL, NULL);
 MODULE_DEPEND(hidraw, hidbus, 1, 1, 1);
 MODULE_DEPEND(hidraw, hid, 1, 1, 1);
 MODULE_DEPEND(hidraw, usb, 1, 1, 1);
diff --git a/sys/dev/usb/input/uhid.c b/sys/dev/usb/input/uhid.c
index 1cad7af222ac..d877773625d7 100644
--- a/sys/dev/usb/input/uhid.c
+++ b/sys/dev/usb/input/uhid.c
@@ -935,7 +935,7 @@ static driver_t uhid_driver = {
 };
 
 #ifdef HIDRAW_MAKE_UHID_ALIAS
-DRIVER_MODULE(uhid, uhub, uhid_driver, hidraw_devclass, NULL, 0);
+DRIVER_MODULE(uhid, uhub, uhid_driver, NULL, NULL);
 #else
 DRIVER_MODULE(uhid, uhub, uhid_driver, uhid_devclass, NULL, 0);
 #endif