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:
parent
62f29f306a
commit
4f2a7ca189
@ -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));
|
||||
|
@ -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));
|
||||
|
@ -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));
|
||||
|
Loading…
x
Reference in New Issue
Block a user