diff options
author | jhb <jhb@FreeBSD.org> | 2006-01-20 22:00:50 +0000 |
---|---|---|
committer | jhb <jhb@FreeBSD.org> | 2006-01-20 22:00:50 +0000 |
commit | 811fcee48ab40b81428912eb391ae15000827ae8 (patch) | |
tree | 67aedc20f08bc676c331b82673a4e0a3508fc0e6 /sys | |
parent | 76788b459e8439347a498ab900465722b7a187cf (diff) | |
download | FreeBSD-src-811fcee48ab40b81428912eb391ae15000827ae8.zip FreeBSD-src-811fcee48ab40b81428912eb391ae15000827ae8.tar.gz |
Make the 'pci_devclass' pointer variable private (drivers really shouldn't
share devclass pointers, a mistake I've encouraged in the past) and
move the declaration of the pci_driver kobj class from cardbus.c to
pci_private.h so that other drivers can inherit from pci_driver.
Diffstat (limited to 'sys')
-rw-r--r-- | sys/dev/cardbus/cardbus.c | 1 | ||||
-rw-r--r-- | sys/dev/pci/pci.c | 2 | ||||
-rw-r--r-- | sys/dev/pci/pci_private.h | 5 |
3 files changed, 3 insertions, 5 deletions
diff --git a/sys/dev/cardbus/cardbus.c b/sys/dev/cardbus/cardbus.c index 85a8113..523e1b9 100644 --- a/sys/dev/cardbus/cardbus.c +++ b/sys/dev/cardbus/cardbus.c @@ -358,7 +358,6 @@ static device_method_t cardbus_methods[] = { {0,0} }; -DECLARE_CLASS(pci_driver); DEFINE_CLASS_1(cardbus, cardbus_driver, cardbus_methods, sizeof(struct cardbus_softc), pci_driver); diff --git a/sys/dev/pci/pci.c b/sys/dev/pci/pci.c index 89facc8..08fd995 100644 --- a/sys/dev/pci/pci.c +++ b/sys/dev/pci/pci.c @@ -137,7 +137,7 @@ static device_method_t pci_methods[] = { DEFINE_CLASS_0(pci, pci_driver, pci_methods, 0); -devclass_t pci_devclass; +static devclass_t pci_devclass; DRIVER_MODULE(pci, pcib, pci_driver, pci_devclass, pci_modevent, 0); MODULE_VERSION(pci, 1); diff --git a/sys/dev/pci/pci_private.h b/sys/dev/pci/pci_private.h index 06beee9..b6bbaa0 100644 --- a/sys/dev/pci/pci_private.h +++ b/sys/dev/pci/pci_private.h @@ -34,10 +34,9 @@ /* * Export definitions of the pci bus so that we can more easily share - * it with "subclass" busses. A more generic subclassing mechanism would - * be nice, but is not present in the tree at this time. + * it with "subclass" busses. */ -extern devclass_t pci_devclass; +DECLARE_CLASS(pci_driver); void pci_add_children(device_t dev, int busno, size_t dinfo_size); void pci_add_child(device_t bus, struct pci_devinfo *dinfo); |