diff options
author | jhb <jhb@FreeBSD.org> | 2006-01-06 19:22:19 +0000 |
---|---|---|
committer | jhb <jhb@FreeBSD.org> | 2006-01-06 19:22:19 +0000 |
commit | 170b22254d46fd33c4a684276f37ca2d6aefb956 (patch) | |
tree | d2180db4affcce14d6d2578bb440ee40547b452b /sys/amd64 | |
parent | 036bca428483e5d0565cb97310cc7fcee2975d20 (diff) | |
download | FreeBSD-src-170b22254d46fd33c4a684276f37ca2d6aefb956.zip FreeBSD-src-170b22254d46fd33c4a684276f37ca2d6aefb956.tar.gz |
- Make pcib_devclass private to sys/dev/pci/pci_pci.c and change all the
various pcib drivers to use their own private devclass_t variables for
their modules.
- Use the DEFINE_CLASS_0() macro to declare drivers for the various pcib
drivers while I'm here.
Diffstat (limited to 'sys/amd64')
-rw-r--r-- | sys/amd64/amd64/mptable_pci.c | 17 | ||||
-rw-r--r-- | sys/amd64/pci/pci_bus.c | 14 |
2 files changed, 9 insertions, 22 deletions
diff --git a/sys/amd64/amd64/mptable_pci.c b/sys/amd64/amd64/mptable_pci.c index 5a34373..43e48b4 100644 --- a/sys/amd64/amd64/mptable_pci.c +++ b/sys/amd64/amd64/mptable_pci.c @@ -100,13 +100,10 @@ static device_method_t mptable_hostb_methods[] = { { 0, 0 } }; -static driver_t mptable_hostb_driver = { - "pcib", - mptable_hostb_methods, - 1, -}; +static devclass_t hostb_devclass; -DRIVER_MODULE(mptable_pcib, legacy, mptable_hostb_driver, pcib_devclass, 0, 0); +DEFINE_CLASS_0(pcib, mptable_hostb_driver, mptable_hostb_methods, 1); +DRIVER_MODULE(mptable_pcib, legacy, mptable_hostb_driver, hostb_devclass, 0, 0); /* PCI to PCI bridge driver. */ @@ -155,11 +152,9 @@ static device_method_t mptable_pcib_pci_methods[] = { {0, 0} }; -static driver_t mptable_pcib_driver = { - "pcib", - mptable_pcib_pci_methods, - sizeof(struct pcib_softc), -}; +static devclass_t pcib_devclass; +DEFINE_CLASS_0(pcib, mptable_pcib_driver, mptable_pcib_pci_methods, + sizeof(struct pcib_softc)); DRIVER_MODULE(mptable_pcib, pci, mptable_pcib_driver, pcib_devclass, 0, 0); diff --git a/sys/amd64/pci/pci_bus.c b/sys/amd64/pci/pci_bus.c index c3e4c96..c9a5ebf 100644 --- a/sys/amd64/pci/pci_bus.c +++ b/sys/amd64/pci/pci_bus.c @@ -326,12 +326,9 @@ static device_method_t legacy_pcib_methods[] = { { 0, 0 } }; -static driver_t legacy_pcib_driver = { - "pcib", - legacy_pcib_methods, - 1, -}; +static devclass_t pcib_devclass; +DEFINE_CLASS_0(pcib, legacy_pcib_driver, legacy_pcib_methods, 1); DRIVER_MODULE(pcib, legacy, legacy_pcib_driver, pcib_devclass, 0, 0); @@ -377,12 +374,7 @@ static device_method_t pcibus_pnp_methods[] = { { 0, 0 } }; -static driver_t pcibus_pnp_driver = { - "pcibus_pnp", - pcibus_pnp_methods, - 1, /* no softc */ -}; - 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); |