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:
Andreas Färber 2013-08-23 20:32:04 +02:00
parent b1187b51ff
commit c889b3a55d
7 changed files with 9 additions and 7 deletions

View file

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