From 7eeede158604048dd21c5817bf9d9ee4721a9129 Mon Sep 17 00:00:00 2001 From: John Baldwin Date: Fri, 6 May 2022 15:46:57 -0700 Subject: [PATCH] hid: Remove unused devclass arguments to DRIVER_MODULE. --- sys/dev/hid/bcm5974.c | 4 +--- sys/dev/hid/hconf.c | 4 +--- sys/dev/hid/hcons.c | 3 +-- sys/dev/hid/hgame.c | 3 +-- sys/dev/hid/hidbus.c | 5 ++--- sys/dev/hid/hidbus.h | 2 -- sys/dev/hid/hkbd.c | 4 +--- sys/dev/hid/hms.c | 3 +-- sys/dev/hid/hmt.c | 4 +--- sys/dev/hid/hpen.c | 3 +-- sys/dev/hid/hsctrl.c | 3 +-- sys/dev/hid/ietp.c | 3 +-- sys/dev/hid/ps4dshock.c | 13 ++++--------- sys/dev/hid/xb360gp.c | 3 +-- 14 files changed, 17 insertions(+), 40 deletions(-) diff --git a/sys/dev/hid/bcm5974.c b/sys/dev/hid/bcm5974.c index cef571ed2f49..26dc5107520f 100644 --- a/sys/dev/hid/bcm5974.c +++ b/sys/dev/hid/bcm5974.c @@ -803,9 +803,7 @@ static driver_t bcm5974_driver = { .size = sizeof(struct bcm5974_softc) }; -static devclass_t bcm5974_devclass; - -DRIVER_MODULE(bcm5974, hidbus, bcm5974_driver, bcm5974_devclass, NULL, 0); +DRIVER_MODULE(bcm5974, hidbus, bcm5974_driver, NULL, NULL); MODULE_DEPEND(bcm5974, hidbus, 1, 1, 1); MODULE_DEPEND(bcm5974, hid, 1, 1, 1); MODULE_DEPEND(bcm5974, evdev, 1, 1, 1); diff --git a/sys/dev/hid/hconf.c b/sys/dev/hid/hconf.c index 90cd52d3116c..12779a1a40ef 100644 --- a/sys/dev/hid/hconf.c +++ b/sys/dev/hid/hconf.c @@ -113,8 +113,6 @@ static device_attach_t hconf_attach; static device_detach_t hconf_detach; static device_resume_t hconf_resume; -static devclass_t hconf_devclass; - static device_method_t hconf_methods[] = { DEVMETHOD(device_probe, hconf_probe), @@ -323,7 +321,7 @@ hconf_set_input_mode(device_t dev, enum hconf_input_mode mode) return (hconf_set_feature_control(sc, INPUT_MODE, mode)); } -DRIVER_MODULE(hconf, hidbus, hconf_driver, hconf_devclass, NULL, 0); +DRIVER_MODULE(hconf, hidbus, hconf_driver, NULL, NULL); MODULE_DEPEND(hconf, hidbus, 1, 1, 1); MODULE_DEPEND(hconf, hid, 1, 1, 1); MODULE_VERSION(hconf, 1); diff --git a/sys/dev/hid/hcons.c b/sys/dev/hid/hcons.c index 33264116bc76..7f3529355818 100644 --- a/sys/dev/hid/hcons.c +++ b/sys/dev/hid/hcons.c @@ -279,7 +279,6 @@ hcons_detach(device_t dev) return (hidmap_detach(device_get_softc(dev))); } -static devclass_t hcons_devclass; static device_method_t hcons_methods[] = { DEVMETHOD(device_probe, hcons_probe), DEVMETHOD(device_attach, hcons_attach), @@ -289,7 +288,7 @@ static device_method_t hcons_methods[] = { }; DEFINE_CLASS_0(hcons, hcons_driver, hcons_methods, sizeof(struct hidmap)); -DRIVER_MODULE(hcons, hidbus, hcons_driver, hcons_devclass, NULL, 0); +DRIVER_MODULE(hcons, hidbus, hcons_driver, NULL, NULL); MODULE_DEPEND(hcons, hid, 1, 1, 1); MODULE_DEPEND(hcons, hidbus, 1, 1, 1); MODULE_DEPEND(hcons, hidmap, 1, 1, 1); diff --git a/sys/dev/hid/hgame.c b/sys/dev/hid/hgame.c index 97b1ac91960c..b746661ae50c 100644 --- a/sys/dev/hid/hgame.c +++ b/sys/dev/hid/hgame.c @@ -217,7 +217,6 @@ hgame_detach(device_t dev) return (hidmap_detach(&sc->hm)); } -static devclass_t hgame_devclass; static device_method_t hgame_methods[] = { DEVMETHOD(device_probe, hgame_probe), DEVMETHOD(device_attach, hgame_attach), @@ -227,7 +226,7 @@ static device_method_t hgame_methods[] = { }; DEFINE_CLASS_0(hgame, hgame_driver, hgame_methods, sizeof(struct hgame_softc)); -DRIVER_MODULE(hgame, hidbus, hgame_driver, hgame_devclass, NULL, 0); +DRIVER_MODULE(hgame, hidbus, hgame_driver, NULL, NULL); MODULE_DEPEND(hgame, hid, 1, 1, 1); MODULE_DEPEND(hgame, hidbus, 1, 1, 1); MODULE_DEPEND(hgame, hidmap, 1, 1, 1); diff --git a/sys/dev/hid/hidbus.c b/sys/dev/hid/hidbus.c index 8067ab57d128..496bdef05700 100644 --- a/sys/dev/hid/hidbus.c +++ b/sys/dev/hid/hidbus.c @@ -916,7 +916,6 @@ static device_method_t hidbus_methods[] = { DEVMETHOD_END }; -devclass_t hidbus_devclass; driver_t hidbus_driver = { "hidbus", hidbus_methods, @@ -925,5 +924,5 @@ driver_t hidbus_driver = { MODULE_DEPEND(hidbus, hid, 1, 1, 1); MODULE_VERSION(hidbus, 1); -DRIVER_MODULE(hidbus, iichid, hidbus_driver, hidbus_devclass, 0, 0); -DRIVER_MODULE(hidbus, usbhid, hidbus_driver, hidbus_devclass, 0, 0); +DRIVER_MODULE(hidbus, iichid, hidbus_driver, 0, 0); +DRIVER_MODULE(hidbus, usbhid, hidbus_driver, 0, 0); diff --git a/sys/dev/hid/hidbus.h b/sys/dev/hid/hidbus.h index d4324a2dc394..b2744add8658 100644 --- a/sys/dev/hid/hidbus.h +++ b/sys/dev/hid/hidbus.h @@ -172,6 +172,4 @@ int hid_set_report_descr(device_t, const void *, hid_size_t); const struct hid_device_info *hid_get_device_info(device_t); -extern devclass_t hidbus_devclass; - #endif /* _HID_HIDBUS_H_ */ diff --git a/sys/dev/hid/hkbd.c b/sys/dev/hid/hkbd.c index ad9b3dde3d37..6fee3b0094a5 100644 --- a/sys/dev/hid/hkbd.c +++ b/sys/dev/hid/hkbd.c @@ -2003,8 +2003,6 @@ hkbd_driver_load(module_t mod, int what, void *arg) return (0); } -static devclass_t hkbd_devclass; - static device_method_t hkbd_methods[] = { DEVMETHOD(device_probe, hkbd_probe), DEVMETHOD(device_attach, hkbd_attach), @@ -2020,7 +2018,7 @@ static driver_t hkbd_driver = { .size = sizeof(struct hkbd_softc), }; -DRIVER_MODULE(hkbd, hidbus, hkbd_driver, hkbd_devclass, hkbd_driver_load, 0); +DRIVER_MODULE(hkbd, hidbus, hkbd_driver, hkbd_driver_load, NULL); MODULE_DEPEND(hkbd, hid, 1, 1, 1); MODULE_DEPEND(hkbd, hidbus, 1, 1, 1); #ifdef EVDEV_SUPPORT diff --git a/sys/dev/hid/hms.c b/sys/dev/hid/hms.c index ae0380ecb6ce..b1580c3db358 100644 --- a/sys/dev/hid/hms.c +++ b/sys/dev/hid/hms.c @@ -317,7 +317,6 @@ hms_detach(device_t dev) return (error); } -static devclass_t hms_devclass; static device_method_t hms_methods[] = { DEVMETHOD(device_identify, hms_identify), DEVMETHOD(device_probe, hms_probe), @@ -328,7 +327,7 @@ static device_method_t hms_methods[] = { }; DEFINE_CLASS_0(hms, hms_driver, hms_methods, sizeof(struct hms_softc)); -DRIVER_MODULE(hms, hidbus, hms_driver, hms_devclass, NULL, 0); +DRIVER_MODULE(hms, hidbus, hms_driver, NULL, NULL); MODULE_DEPEND(hms, hid, 1, 1, 1); MODULE_DEPEND(hms, hidbus, 1, 1, 1); MODULE_DEPEND(hms, hidmap, 1, 1, 1); diff --git a/sys/dev/hid/hmt.c b/sys/dev/hid/hmt.c index 42dadfe24256..0534b82cecb1 100644 --- a/sys/dev/hid/hmt.c +++ b/sys/dev/hid/hmt.c @@ -894,8 +894,6 @@ hmt_set_input_mode(struct hmt_softc *sc, enum hconf_input_mode mode) return (err); } -static devclass_t hmt_devclass; - static device_method_t hmt_methods[] = { DEVMETHOD(device_probe, hmt_probe), DEVMETHOD(device_attach, hmt_attach), @@ -910,7 +908,7 @@ static driver_t hmt_driver = { .size = sizeof(struct hmt_softc), }; -DRIVER_MODULE(hmt, hidbus, hmt_driver, hmt_devclass, NULL, 0); +DRIVER_MODULE(hmt, hidbus, hmt_driver, NULL, NULL); MODULE_DEPEND(hmt, hidbus, 1, 1, 1); MODULE_DEPEND(hmt, hid, 1, 1, 1); MODULE_DEPEND(hmt, hconf, 1, 1, 1); diff --git a/sys/dev/hid/hpen.c b/sys/dev/hid/hpen.c index 7fed4e193016..6ffd1f387a0b 100644 --- a/sys/dev/hid/hpen.c +++ b/sys/dev/hid/hpen.c @@ -243,7 +243,6 @@ hpen_detach(device_t dev) } -static devclass_t hpen_devclass; static device_method_t hpen_methods[] = { DEVMETHOD(device_identify, hpen_identify), DEVMETHOD(device_probe, hpen_probe), @@ -254,7 +253,7 @@ static device_method_t hpen_methods[] = { }; DEFINE_CLASS_0(hpen, hpen_driver, hpen_methods, sizeof(struct hidmap)); -DRIVER_MODULE(hpen, hidbus, hpen_driver, hpen_devclass, NULL, 0); +DRIVER_MODULE(hpen, hidbus, hpen_driver, NULL, NULL); MODULE_DEPEND(hpen, hid, 1, 1, 1); MODULE_DEPEND(hpen, hidbus, 1, 1, 1); MODULE_DEPEND(hpen, hidmap, 1, 1, 1); diff --git a/sys/dev/hid/hsctrl.c b/sys/dev/hid/hsctrl.c index 2e0a06f547ac..1328fb671bfc 100644 --- a/sys/dev/hid/hsctrl.c +++ b/sys/dev/hid/hsctrl.c @@ -91,7 +91,6 @@ hsctrl_detach(device_t dev) return (hidmap_detach(device_get_softc(dev))); } -static devclass_t hsctrl_devclass; static device_method_t hsctrl_methods[] = { DEVMETHOD(device_probe, hsctrl_probe), DEVMETHOD(device_attach, hsctrl_attach), @@ -101,7 +100,7 @@ static device_method_t hsctrl_methods[] = { }; DEFINE_CLASS_0(hsctrl, hsctrl_driver, hsctrl_methods, sizeof(struct hidmap)); -DRIVER_MODULE(hsctrl, hidbus, hsctrl_driver, hsctrl_devclass, NULL, 0); +DRIVER_MODULE(hsctrl, hidbus, hsctrl_driver, NULL, NULL); MODULE_DEPEND(hsctrl, hid, 1, 1, 1); MODULE_DEPEND(hsctrl, hidbus, 1, 1, 1); MODULE_DEPEND(hsctrl, hidmap, 1, 1, 1); diff --git a/sys/dev/hid/ietp.c b/sys/dev/hid/ietp.c index 4991922968d2..6d0570c88e30 100644 --- a/sys/dev/hid/ietp.c +++ b/sys/dev/hid/ietp.c @@ -609,7 +609,6 @@ ietp_iic_write_reg(device_t dev, uint16_t reg, uint16_t val) return (hid_ioctl(dev, I2CRDWR, (uintptr_t)&ird)); } -static devclass_t ietp_devclass; static device_method_t ietp_methods[] = { DEVMETHOD(device_probe, ietp_iic_probe), DEVMETHOD(device_attach, ietp_iic_attach), @@ -624,7 +623,7 @@ static driver_t ietp_driver = { .size = sizeof(struct ietp_softc), }; -DRIVER_MODULE(ietp, hidbus, ietp_driver, ietp_devclass, NULL, 0); +DRIVER_MODULE(ietp, hidbus, ietp_driver, NULL, NULL); MODULE_DEPEND(ietp, hidbus, 1, 1, 1); MODULE_DEPEND(ietp, hid, 1, 1, 1); MODULE_DEPEND(ietp, evdev, 1, 1, 1); diff --git a/sys/dev/hid/ps4dshock.c b/sys/dev/hid/ps4dshock.c index afb74bc4b843..504ce8cc4661 100644 --- a/sys/dev/hid/ps4dshock.c +++ b/sys/dev/hid/ps4dshock.c @@ -1333,11 +1333,6 @@ ps4dsmtp_detach(device_t dev) return (hidmap_detach(&sc->hm)); } -static devclass_t ps4dshock_devclass; -static devclass_t ps4dsacc_devclass; -static devclass_t ps4dshead_devclass; -static devclass_t ps4dsmtp_devclass; - static device_method_t ps4dshock_methods[] = { DEVMETHOD(device_identify, ps4dshock_identify), DEVMETHOD(device_probe, ps4dshock_probe), @@ -1370,16 +1365,16 @@ static device_method_t ps4dsmtp_methods[] = { DEFINE_CLASS_0(ps4dsacc, ps4dsacc_driver, ps4dsacc_methods, sizeof(struct ps4dsacc_softc)); -DRIVER_MODULE(ps4dsacc, hidbus, ps4dsacc_driver, ps4dsacc_devclass, NULL, 0); +DRIVER_MODULE(ps4dsacc, hidbus, ps4dsacc_driver, NULL, NULL); DEFINE_CLASS_0(ps4dshead, ps4dshead_driver, ps4dshead_methods, sizeof(struct hidmap)); -DRIVER_MODULE(ps4dshead, hidbus, ps4dshead_driver, ps4dshead_devclass, NULL, 0); +DRIVER_MODULE(ps4dshead, hidbus, ps4dshead_driver, NULL, NULL); DEFINE_CLASS_0(ps4dsmtp, ps4dsmtp_driver, ps4dsmtp_methods, sizeof(struct ps4dsmtp_softc)); -DRIVER_MODULE(ps4dsmtp, hidbus, ps4dsmtp_driver, ps4dsmtp_devclass, NULL, 0); +DRIVER_MODULE(ps4dsmtp, hidbus, ps4dsmtp_driver, NULL, NULL); DEFINE_CLASS_0(ps4dshock, ps4dshock_driver, ps4dshock_methods, sizeof(struct ps4dshock_softc)); -DRIVER_MODULE(ps4dshock, hidbus, ps4dshock_driver, ps4dshock_devclass, NULL, 0); +DRIVER_MODULE(ps4dshock, hidbus, ps4dshock_driver, NULL, NULL); MODULE_DEPEND(ps4dshock, hid, 1, 1, 1); MODULE_DEPEND(ps4dshock, hidbus, 1, 1, 1); diff --git a/sys/dev/hid/xb360gp.c b/sys/dev/hid/xb360gp.c index f255c110f47c..8f4377305f8a 100644 --- a/sys/dev/hid/xb360gp.c +++ b/sys/dev/hid/xb360gp.c @@ -162,7 +162,6 @@ xb360gp_detach(device_t dev) return (hidmap_detach(&sc->hm)); } -static devclass_t xb360gp_devclass; static device_method_t xb360gp_methods[] = { DEVMETHOD(device_identify, xb360gp_identify), DEVMETHOD(device_probe, xb360gp_probe), @@ -173,7 +172,7 @@ static device_method_t xb360gp_methods[] = { DEFINE_CLASS_0(xb360gp, xb360gp_driver, xb360gp_methods, sizeof(struct hgame_softc)); -DRIVER_MODULE(xb360gp, hidbus, xb360gp_driver, xb360gp_devclass, NULL, 0); +DRIVER_MODULE(xb360gp, hidbus, xb360gp_driver, NULL, NULL); MODULE_DEPEND(xb360gp, hid, 1, 1, 1); MODULE_DEPEND(xb360gp, hidbus, 1, 1, 1); MODULE_DEPEND(xb360gp, hidmap, 1, 1, 1);