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.
This commit is contained in:
John Birrell 2004-12-28 22:17:10 +00:00
parent 62f29f306a
commit 4f2a7ca189
3 changed files with 3 additions and 3 deletions

View File

@ -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));

View File

@ -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));

View File

@ -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));