summaryrefslogtreecommitdiffstats
path: root/sys/dev/usb
diff options
context:
space:
mode:
authorjb <jb@FreeBSD.org>2004-12-28 22:17:10 +0000
committerjb <jb@FreeBSD.org>2004-12-28 22:17:10 +0000
commit08d2181db13732c7db3a057fbfccb0cf42717b86 (patch)
tree3da7ed3d9bd75ff3c3a646d21f575ec7d3dfa61f /sys/dev/usb
parentf5cc9e76634458c8a772ad2cf9c1d9dd5e589a4d (diff)
downloadFreeBSD-src-08d2181db13732c7db3a057fbfccb0cf42717b86.zip
FreeBSD-src-08d2181db13732c7db3a057fbfccb0cf42717b86.tar.gz
Pass an explicit pointer to the bus structure in the 'usb' device ivar
rather than a softc pointer (with the bus structure at the start). This is a non-functional change. It just helps when reading the code to know that the ehci, ohci and uhci drivers share the bus structure, not the entire softc.
Diffstat (limited to 'sys/dev/usb')
-rw-r--r--sys/dev/usb/ehci_pci.c2
-rw-r--r--sys/dev/usb/ohci_pci.c2
-rw-r--r--sys/dev/usb/uhci_pci.c2
3 files changed, 3 insertions, 3 deletions
diff --git a/sys/dev/usb/ehci_pci.c b/sys/dev/usb/ehci_pci.c
index 5b1b1f1..2ccbeb9 100644
--- a/sys/dev/usb/ehci_pci.c
+++ b/sys/dev/usb/ehci_pci.c
@@ -239,7 +239,7 @@ ehci_pci_attach(device_t self)
ehci_pci_detach(self);
return ENOMEM;
}
- device_set_ivars(sc->sc_bus.bdev, sc);
+ device_set_ivars(sc->sc_bus.bdev, &sc->sc_bus);
/* ehci_pci_match will never return NULL if ehci_pci_probe succeeded */
device_set_desc(sc->sc_bus.bdev, ehci_pci_match(self));
diff --git a/sys/dev/usb/ohci_pci.c b/sys/dev/usb/ohci_pci.c
index 6700323..3766e68 100644
--- a/sys/dev/usb/ohci_pci.c
+++ b/sys/dev/usb/ohci_pci.c
@@ -244,7 +244,7 @@ ohci_pci_attach(device_t self)
ohci_pci_detach(self);
return ENOMEM;
}
- device_set_ivars(sc->sc_bus.bdev, sc);
+ device_set_ivars(sc->sc_bus.bdev, &sc->sc_bus);
/* ohci_pci_match will never return NULL if ohci_pci_probe succeeded */
device_set_desc(sc->sc_bus.bdev, ohci_pci_match(self));
diff --git a/sys/dev/usb/uhci_pci.c b/sys/dev/usb/uhci_pci.c
index 50b12c7..3583eae 100644
--- a/sys/dev/usb/uhci_pci.c
+++ b/sys/dev/usb/uhci_pci.c
@@ -297,7 +297,7 @@ uhci_pci_attach(device_t self)
uhci_pci_detach(self);
return ENOMEM;
}
- device_set_ivars(sc->sc_bus.bdev, sc);
+ device_set_ivars(sc->sc_bus.bdev, &sc->sc_bus);
/* uhci_pci_match must never return NULL if uhci_pci_probe succeeded */
device_set_desc(sc->sc_bus.bdev, uhci_pci_match(self));
OpenPOWER on IntegriCloud