summaryrefslogtreecommitdiff
path: root/hw/usb/hcd-uhci.c
diff options
context:
space:
mode:
authorAndreas Färber <afaerber@suse.de>2013-08-23 20:32:04 +0200
committerAndreas Färber <afaerber@suse.de>2013-08-30 20:14:39 +0200
commitc889b3a55d5d1d18042693cbe2f8f05465914ff4 (patch)
tree1d019bceebdf629781739c56fdd599dc3f20bde0 /hw/usb/hcd-uhci.c
parentb1187b51ff5563135da0a9e5c855d7876ab1a926 (diff)
downloadqemu-c889b3a55d5d1d18042693cbe2f8f05465914ff4.tar.gz
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>
Diffstat (limited to 'hw/usb/hcd-uhci.c')
-rw-r--r--hw/usb/hcd-uhci.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/hw/usb/hcd-uhci.c b/hw/usb/hcd-uhci.c
index 578b949c92..becc7faec1 100644
--- a/hw/usb/hcd-uhci.c
+++ b/hw/usb/hcd-uhci.c
@@ -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);