summaryrefslogtreecommitdiffstats
path: root/sys/dev/pci
diff options
context:
space:
mode:
authorjhb <jhb@FreeBSD.org>2006-01-06 19:22:19 +0000
committerjhb <jhb@FreeBSD.org>2006-01-06 19:22:19 +0000
commit170b22254d46fd33c4a684276f37ca2d6aefb956 (patch)
treed2180db4affcce14d6d2578bb440ee40547b452b /sys/dev/pci
parent036bca428483e5d0565cb97310cc7fcee2975d20 (diff)
downloadFreeBSD-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/dev/pci')
-rw-r--r--sys/dev/pci/pci_pci.c9
-rw-r--r--sys/dev/pci/pcib_private.h2
2 files changed, 2 insertions, 9 deletions
diff --git a/sys/dev/pci/pci_pci.c b/sys/dev/pci/pci_pci.c
index 2795f02..586379b 100644
--- a/sys/dev/pci/pci_pci.c
+++ b/sys/dev/pci/pci_pci.c
@@ -83,14 +83,9 @@ static device_method_t pcib_methods[] = {
{ 0, 0 }
};
-static driver_t pcib_driver = {
- "pcib",
- pcib_methods,
- sizeof(struct pcib_softc),
-};
-
-devclass_t pcib_devclass;
+static devclass_t pcib_devclass;
+DEFINE_CLASS_0(pcib, pcib_driver, pcib_methods, sizeof(struct pcib_softc));
DRIVER_MODULE(pcib, pci, pcib_driver, pcib_devclass, 0, 0);
/*
diff --git a/sys/dev/pci/pcib_private.h b/sys/dev/pci/pcib_private.h
index a4acaab..7ceb3db 100644
--- a/sys/dev/pci/pcib_private.h
+++ b/sys/dev/pci/pcib_private.h
@@ -75,6 +75,4 @@ uint32_t pcib_read_config(device_t dev, int b, int s, int f, int reg, int width)
void pcib_write_config(device_t dev, int b, int s, int f, int reg, uint32_t val, int width);
int pcib_route_interrupt(device_t pcib, device_t dev, int pin);
-extern devclass_t pcib_devclass;
-
#endif
OpenPOWER on IntegriCloud