From 80d2b3de16bf9d5df774555382ce8e3f4f887b6f Mon Sep 17 00:00:00 2001 From: John Baldwin Date: Fri, 6 May 2022 15:46:58 -0700 Subject: [PATCH] x86: Remove unused devclass arguments to DRIVER_MODULE. --- sys/x86/bios/vpd.c | 4 +--- sys/x86/iommu/intel_drv.c | 3 +-- sys/x86/isa/atpic.c | 6 ++---- sys/x86/isa/atrtc.c | 6 ++---- sys/x86/isa/clock.c | 6 ++---- sys/x86/isa/isa_dma.c | 6 ++---- sys/x86/isa/orm.c | 4 +--- sys/x86/pci/pci_bus.c | 12 +++--------- sys/x86/pci/qpi.c | 8 ++------ sys/x86/x86/io_apic.c | 6 ++---- sys/x86/x86/legacy.c | 7 +++---- sys/x86/x86/mptable_pci.c | 8 ++------ sys/x86/x86/nexus.c | 11 +++-------- 13 files changed, 26 insertions(+), 61 deletions(-) diff --git a/sys/x86/bios/vpd.c b/sys/x86/bios/vpd.c index c47e2d1fe216..6b788d4e9040 100644 --- a/sys/x86/bios/vpd.c +++ b/sys/x86/bios/vpd.c @@ -95,8 +95,6 @@ struct vpd_softc { #define RES2VPD(res) ((struct vpd *)rman_get_virtual(res)) #define ADDR2VPD(addr) ((struct vpd *)BIOS_PADDRTOVADDR(addr)) -static devclass_t vpd_devclass; - static void vpd_identify (driver_t *, device_t); static int vpd_probe (device_t); static int vpd_attach (device_t); @@ -289,7 +287,7 @@ static driver_t vpd_driver = { sizeof(struct vpd_softc), }; -DRIVER_MODULE(vpd, nexus, vpd_driver, vpd_devclass, vpd_modevent, 0); +DRIVER_MODULE(vpd, nexus, vpd_driver, vpd_modevent, 0); MODULE_VERSION(vpd, 1); /* diff --git a/sys/x86/iommu/intel_drv.c b/sys/x86/iommu/intel_drv.c index 1d96faf53fec..9e049cab7b06 100644 --- a/sys/x86/iommu/intel_drv.c +++ b/sys/x86/iommu/intel_drv.c @@ -83,7 +83,6 @@ __FBSDID("$FreeBSD$"); #define DMAR_QI_IRQ_RID 1 #define DMAR_REG_RID 2 -static devclass_t dmar_devclass; static device_t *dmar_devs; static int dmar_devcnt; @@ -600,7 +599,7 @@ static driver_t dmar_driver = { sizeof(struct dmar_unit), }; -DRIVER_MODULE(dmar, acpi, dmar_driver, dmar_devclass, 0, 0); +DRIVER_MODULE(dmar, acpi, dmar_driver, 0, 0); MODULE_DEPEND(dmar, acpi, 1, 1, 1); static void diff --git a/sys/x86/isa/atpic.c b/sys/x86/isa/atpic.c index de72780c100b..0c0ca6d3ea8d 100644 --- a/sys/x86/isa/atpic.c +++ b/sys/x86/isa/atpic.c @@ -613,9 +613,7 @@ static driver_t atpic_driver = { 1, /* no softc */ }; -static devclass_t atpic_devclass; - -DRIVER_MODULE(atpic, isa, atpic_driver, atpic_devclass, 0, 0); -DRIVER_MODULE(atpic, acpi, atpic_driver, atpic_devclass, 0, 0); +DRIVER_MODULE(atpic, isa, atpic_driver, 0, 0); +DRIVER_MODULE(atpic, acpi, atpic_driver, 0, 0); ISA_PNP_INFO(atpic_ids); #endif /* DEV_ISA */ diff --git a/sys/x86/isa/atrtc.c b/sys/x86/isa/atrtc.c index 68ea554fd95b..33eb9a4bbdf0 100644 --- a/sys/x86/isa/atrtc.c +++ b/sys/x86/isa/atrtc.c @@ -676,10 +676,8 @@ static driver_t atrtc_acpi_driver = { }; #endif /* DEV_ACPI */ -static devclass_t atrtc_devclass; - -DRIVER_MODULE(atrtc, isa, atrtc_isa_driver, atrtc_devclass, 0, 0); +DRIVER_MODULE(atrtc, isa, atrtc_isa_driver, 0, 0); #ifdef DEV_ACPI -DRIVER_MODULE(atrtc, acpi, atrtc_acpi_driver, atrtc_devclass, 0, 0); +DRIVER_MODULE(atrtc, acpi, atrtc_acpi_driver, 0, 0); #endif ISA_PNP_INFO(atrtc_ids); diff --git a/sys/x86/isa/clock.c b/sys/x86/isa/clock.c index cb869070845f..f0074ccc87ae 100644 --- a/sys/x86/isa/clock.c +++ b/sys/x86/isa/clock.c @@ -660,10 +660,8 @@ static driver_t attimer_driver = { sizeof(struct attimer_softc), }; -static devclass_t attimer_devclass; - -DRIVER_MODULE(attimer, isa, attimer_driver, attimer_devclass, 0, 0); -DRIVER_MODULE(attimer, acpi, attimer_driver, attimer_devclass, 0, 0); +DRIVER_MODULE(attimer, isa, attimer_driver, 0, 0); +DRIVER_MODULE(attimer, acpi, attimer_driver, 0, 0); ISA_PNP_INFO(attimer_ids); #endif /* DEV_ISA */ diff --git a/sys/x86/isa/isa_dma.c b/sys/x86/isa/isa_dma.c index 661dcd8c0825..2a9a296c870e 100644 --- a/sys/x86/isa/isa_dma.c +++ b/sys/x86/isa/isa_dma.c @@ -604,8 +604,6 @@ static driver_t atdma_driver = { 1, /* no softc */ }; -static devclass_t atdma_devclass; - -DRIVER_MODULE(atdma, isa, atdma_driver, atdma_devclass, 0, 0); -DRIVER_MODULE(atdma, acpi, atdma_driver, atdma_devclass, 0, 0); +DRIVER_MODULE(atdma, isa, atdma_driver, 0, 0); +DRIVER_MODULE(atdma, acpi, atdma_driver, 0, 0); ISA_PNP_INFO(atdma_ids); diff --git a/sys/x86/isa/orm.c b/sys/x86/isa/orm.c index 6c16a8f63b27..88041aa7b0bb 100644 --- a/sys/x86/isa/orm.c +++ b/sys/x86/isa/orm.c @@ -185,7 +185,5 @@ static driver_t orm_driver = { sizeof (struct orm_softc) }; -static devclass_t orm_devclass; - -DRIVER_MODULE(orm, isa, orm_driver, orm_devclass, 0, 0); +DRIVER_MODULE(orm, isa, orm_driver, 0, 0); ISA_PNP_INFO(orm_ids); diff --git a/sys/x86/pci/pci_bus.c b/sys/x86/pci/pci_bus.c index 5f51f41ef8d3..f2a919989f02 100644 --- a/sys/x86/pci/pci_bus.c +++ b/sys/x86/pci/pci_bus.c @@ -667,10 +667,8 @@ static device_method_t legacy_pcib_methods[] = { DEVMETHOD_END }; -static devclass_t hostb_devclass; - DEFINE_CLASS_0(pcib, legacy_pcib_driver, legacy_pcib_methods, 1); -DRIVER_MODULE(pcib, legacy, legacy_pcib_driver, hostb_devclass, 0, 0); +DRIVER_MODULE(pcib, legacy, legacy_pcib_driver, 0, 0); /* * Install placeholder to claim the resources owned by the @@ -714,10 +712,8 @@ static device_method_t pcibus_pnp_methods[] = { { 0, 0 } }; -static devclass_t pcibus_pnp_devclass; - DEFINE_CLASS_0(pcibus_pnp, pcibus_pnp_driver, pcibus_pnp_methods, 1); -DRIVER_MODULE(pcibus_pnp, isa, pcibus_pnp_driver, pcibus_pnp_devclass, 0, 0); +DRIVER_MODULE(pcibus_pnp, isa, pcibus_pnp_driver, 0, 0); #ifdef __HAVE_PIR /* @@ -736,11 +732,9 @@ static device_method_t pcibios_pcib_pci_methods[] = { {0, 0} }; -static devclass_t pcib_devclass; - DEFINE_CLASS_1(pcib, pcibios_pcib_driver, pcibios_pcib_pci_methods, sizeof(struct pcib_softc), pcib_driver); -DRIVER_MODULE(pcibios_pcib, pci, pcibios_pcib_driver, pcib_devclass, 0, 0); +DRIVER_MODULE(pcibios_pcib, pci, pcibios_pcib_driver, 0, 0); ISA_PNP_INFO(pcibus_pnp_ids); static int diff --git a/sys/x86/pci/qpi.c b/sys/x86/pci/qpi.c index f567d680ad96..fa5aba25e4be 100644 --- a/sys/x86/pci/qpi.c +++ b/sys/x86/pci/qpi.c @@ -214,10 +214,8 @@ static device_method_t qpi_methods[] = { { 0, 0 } }; -static devclass_t qpi_devclass; - DEFINE_CLASS_0(qpi, qpi_driver, qpi_methods, 0); -DRIVER_MODULE(qpi, nexus, qpi_driver, qpi_devclass, 0, 0); +DRIVER_MODULE(qpi, nexus, qpi_driver, 0, 0); static int qpi_pcib_probe(device_t dev) @@ -311,7 +309,5 @@ static device_method_t qpi_pcib_methods[] = { DEVMETHOD_END }; -static devclass_t qpi_pcib_devclass; - DEFINE_CLASS_0(pcib, qpi_pcib_driver, qpi_pcib_methods, 0); -DRIVER_MODULE(pcib, qpi, qpi_pcib_driver, qpi_pcib_devclass, 0, 0); +DRIVER_MODULE(pcib, qpi, qpi_pcib_driver, 0, 0); diff --git a/sys/x86/x86/io_apic.c b/sys/x86/x86/io_apic.c index 444bcb87064e..c9f1a8ea274d 100644 --- a/sys/x86/x86/io_apic.c +++ b/sys/x86/x86/io_apic.c @@ -1059,8 +1059,7 @@ static device_method_t ioapic_pci_methods[] = { DEFINE_CLASS_0(ioapic, ioapic_pci_driver, ioapic_pci_methods, 0); -static devclass_t ioapic_devclass; -DRIVER_MODULE(ioapic, pci, ioapic_pci_driver, ioapic_devclass, 0, 0); +DRIVER_MODULE(ioapic, pci, ioapic_pci_driver, 0, 0); int ioapic_get_rid(u_int apic_id, uint16_t *ridp) @@ -1150,8 +1149,7 @@ static device_method_t apic_methods[] = { DEFINE_CLASS_0(apic, apic_driver, apic_methods, 0); -static devclass_t apic_devclass; -DRIVER_MODULE(apic, nexus, apic_driver, apic_devclass, 0, 0); +DRIVER_MODULE(apic, nexus, apic_driver, 0, 0); #include "opt_ddb.h" diff --git a/sys/x86/x86/legacy.c b/sys/x86/x86/legacy.c index 991f31673b61..7e54d6951a8a 100644 --- a/sys/x86/x86/legacy.c +++ b/sys/x86/x86/legacy.c @@ -99,9 +99,8 @@ static driver_t legacy_driver = { legacy_methods, 1, /* no softc */ }; -static devclass_t legacy_devclass; -DRIVER_MODULE(legacy, nexus, legacy_driver, legacy_devclass, 0, 0); +DRIVER_MODULE(legacy, nexus, legacy_driver, 0, 0); static int legacy_probe(device_t dev) @@ -312,8 +311,8 @@ static driver_t cpu_driver = { cpu_methods, 1, /* no softc */ }; -static devclass_t cpu_devclass; -DRIVER_MODULE(cpu, legacy, cpu_driver, cpu_devclass, 0, 0); + +DRIVER_MODULE(cpu, legacy, cpu_driver, 0, 0); static void cpu_identify(driver_t *driver, device_t parent) diff --git a/sys/x86/x86/mptable_pci.c b/sys/x86/x86/mptable_pci.c index d4bda2183ba1..1a1d98eafc39 100644 --- a/sys/x86/x86/mptable_pci.c +++ b/sys/x86/x86/mptable_pci.c @@ -199,11 +199,9 @@ static device_method_t mptable_hostb_methods[] = { DEVMETHOD_END }; -static devclass_t hostb_devclass; - DEFINE_CLASS_0(pcib, mptable_hostb_driver, mptable_hostb_methods, sizeof(struct mptable_hostb_softc)); -DRIVER_MODULE(mptable_pcib, legacy, mptable_hostb_driver, hostb_devclass, 0, 0); +DRIVER_MODULE(mptable_pcib, legacy, mptable_hostb_driver, 0, 0); /* PCI to PCI bridge driver. */ @@ -233,8 +231,6 @@ static device_method_t mptable_pcib_pci_methods[] = { {0, 0} }; -static devclass_t pcib_devclass; - DEFINE_CLASS_1(pcib, mptable_pcib_driver, mptable_pcib_pci_methods, sizeof(struct pcib_softc), pcib_driver); -DRIVER_MODULE(mptable_pcib, pci, mptable_pcib_driver, pcib_devclass, 0, 0); +DRIVER_MODULE(mptable_pcib, pci, mptable_pcib_driver, 0, 0); diff --git a/sys/x86/x86/nexus.c b/sys/x86/x86/nexus.c index 2ab891c728c5..f5509885e1a0 100644 --- a/sys/x86/x86/nexus.c +++ b/sys/x86/x86/nexus.c @@ -192,9 +192,8 @@ static device_method_t nexus_methods[] = { }; DEFINE_CLASS_0(nexus, nexus_driver, nexus_methods, 1); -static devclass_t nexus_devclass; -DRIVER_MODULE(nexus, root, nexus_driver, nexus_devclass, 0, 0); +DRIVER_MODULE(nexus, root, nexus_driver, 0, 0); static int nexus_probe(device_t dev) @@ -867,9 +866,7 @@ static driver_t ram_driver = { 1, /* no softc */ }; -static devclass_t ram_devclass; - -DRIVER_MODULE(ram, nexus, ram_driver, ram_devclass, 0, 0); +DRIVER_MODULE(ram, nexus, ram_driver, 0, 0); #ifdef DEV_ISA /* @@ -916,8 +913,6 @@ static driver_t sysresource_driver = { 1, /* no softc */ }; -static devclass_t sysresource_devclass; - -DRIVER_MODULE(sysresource, isa, sysresource_driver, sysresource_devclass, 0, 0); +DRIVER_MODULE(sysresource, isa, sysresource_driver, 0, 0); ISA_PNP_INFO(sysresource_ids); #endif /* DEV_ISA */