mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-06 09:13:55 -06:00
usb: Pass size to usb_bus_new()
To be passed to qbus_create_inplace(). Use DEVICE() cast to avoid a direct parent field access. Reviewed-by: Wenchao Xia <xiawenc@linux.vnet.ibm.com> Signed-off-by: Andreas Färber <afaerber@suse.de>
This commit is contained in:
parent
b1187b51ff
commit
c889b3a55d
7 changed files with 9 additions and 7 deletions
|
@ -1254,7 +1254,7 @@ static int usb_uhci_common_initfn(PCIDevice *dev)
|
|||
return -1;
|
||||
}
|
||||
} else {
|
||||
usb_bus_new(&s->bus, &uhci_bus_ops, &s->dev.qdev);
|
||||
usb_bus_new(&s->bus, sizeof(s->bus), &uhci_bus_ops, DEVICE(dev));
|
||||
for (i = 0; i < NB_PORTS; i++) {
|
||||
usb_register_port(&s->bus, &s->ports[i].port, s, i, &uhci_port_ops,
|
||||
USB_SPEED_MASK_LOW | USB_SPEED_MASK_FULL);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue