[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [RFT PATCH v1 23/30] usb/*: substitute ->qdev casts with DE
From: |
peter . crosthwaite |
Subject: |
[Qemu-devel] [RFT PATCH v1 23/30] usb/*: substitute ->qdev casts with DEVICE() |
Date: |
Tue, 11 Jun 2013 16:57:27 +1000 |
From: Peter Crosthwaite <address@hidden>
Signed-off-by: Peter Crosthwaite <address@hidden>
---
hw/usb/hcd-ehci-pci.c | 13 ++++++++-----
hw/usb/hcd-ohci.c | 2 +-
hw/usb/hcd-uhci.c | 2 +-
3 files changed, 10 insertions(+), 7 deletions(-)
diff --git a/hw/usb/hcd-ehci-pci.c b/hw/usb/hcd-ehci-pci.c
index 0eb7826..c772e1f 100644
--- a/hw/usb/hcd-ehci-pci.c
+++ b/hw/usb/hcd-ehci-pci.c
@@ -197,6 +197,7 @@ int ehci_create_ich9_with_companions(PCIBus *bus, int slot)
const struct ehci_companions *comp;
PCIDevice *ehci, *uhci;
BusState *usbbus;
+ DeviceState *dev;
const char *name;
int i;
@@ -214,15 +215,17 @@ int ehci_create_ich9_with_companions(PCIBus *bus, int
slot)
}
ehci = pci_create_multifunction(bus, PCI_DEVFN(slot, 7), true, name);
- qdev_init_nofail(&ehci->qdev);
- usbbus = QLIST_FIRST(&ehci->qdev.child_bus);
+ dev = DEVICE(ehci);
+ qdev_init_nofail(dev);
+ usbbus = QLIST_FIRST(&dev->child_bus);
for (i = 0; i < 3; i++) {
uhci = pci_create_multifunction(bus, PCI_DEVFN(slot, comp[i].func),
true, comp[i].name);
- qdev_prop_set_string(&uhci->qdev, "masterbus", usbbus->name);
- qdev_prop_set_uint32(&uhci->qdev, "firstport", comp[i].port);
- qdev_init_nofail(&uhci->qdev);
+ dev = DEVICE(uhci);
+ qdev_prop_set_string(dev, "masterbus", usbbus->name);
+ qdev_prop_set_uint32(dev, "firstport", comp[i].port);
+ qdev_init_nofail(dev);
}
return 0;
}
diff --git a/hw/usb/hcd-ohci.c b/hw/usb/hcd-ohci.c
index 51241cd..62c08ee 100644
--- a/hw/usb/hcd-ohci.c
+++ b/hw/usb/hcd-ohci.c
@@ -1857,7 +1857,7 @@ static int usb_ohci_initfn_pci(struct PCIDevice *dev)
ohci->pci_dev.config[PCI_CLASS_PROG] = 0x10; /* OHCI */
ohci->pci_dev.config[PCI_INTERRUPT_PIN] = 0x01; /* interrupt pin A */
- if (usb_ohci_init(&ohci->state, &dev->qdev, ohci->num_ports, 0,
+ if (usb_ohci_init(&ohci->state, DEVICE(dev), ohci->num_ports, 0,
ohci->masterbus, ohci->firstport,
pci_dma_context(dev)) != 0) {
return -1;
diff --git a/hw/usb/hcd-uhci.c b/hw/usb/hcd-uhci.c
index c85b203..67c13c3 100644
--- a/hw/usb/hcd-uhci.c
+++ b/hw/usb/hcd-uhci.c
@@ -1246,7 +1246,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, &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);
--
1.8.3.rc1.44.gb387c77.dirty
- [Qemu-devel] [RFT PATCH v1 14/30] misc/ivshmem: QOM Upcast Sweep, (continued)
- [Qemu-devel] [RFT PATCH v1 14/30] misc/ivshmem: QOM Upcast Sweep, peter . crosthwaite, 2013/06/11
- [Qemu-devel] [RFT PATCH v1 15/30] xen/xen_platform: QOM casting sweep, peter . crosthwaite, 2013/06/11
- [Qemu-devel] [RFT PATCH v1 16/30] isa/*: QOM casting sweep, peter . crosthwaite, 2013/06/11
- [Qemu-devel] [RFT PATCH v1 17/30] pci/*: QOM casting sweep, peter . crosthwaite, 2013/06/11
- [Qemu-devel] [RFT PATCH v1 18/30] pci-bridge/pci_bridge_dev: Don't use DO_UPCAST, peter . crosthwaite, 2013/06/11
- [Qemu-devel] [RFT PATCH v1 19/30] pci-bridge/*: substitute ->qdev casts with DEVICE(), peter . crosthwaite, 2013/06/11
- [Qemu-devel] [RFT PATCH v1 20/30] misc/vfio: substitute ->qdev casts with DEVICE(), peter . crosthwaite, 2013/06/11
- [Qemu-devel] [RFT PATCH v1 21/30] net/eepro100: substitute ->qdev casts with DEVICE(), peter . crosthwaite, 2013/06/11
- [Qemu-devel] [RFT PATCH v1 22/30] net/ne2000: substitute ->qdev casts with DEVICE(), peter . crosthwaite, 2013/06/11
- [Qemu-devel] [RFT PATCH v1 23/30] usb/*: substitute ->qdev casts with DEVICE(),
peter . crosthwaite <=
- [Qemu-devel] [RFT PATCH v1 24/30] watchdog/wdt_i6300esb: substitute ->qdev casts with DEVICE(), peter . crosthwaite, 2013/06/11
- [Qemu-devel] [RFT PATCH v1 25/30] scsi/vmw_pvscsi: substitute ->qdev casts with DEVICE(), peter . crosthwaite, 2013/06/11
- [Qemu-devel] [RFT PATCH v1 26/30] i2c/smbus_ich9: substitute ->qdev casts with DEVICE(), peter . crosthwaite, 2013/06/11
- [Qemu-devel] [RFT PATCH v1 27/30] ide/cmd646: substitute ->qdev casts with DEVICE(), peter . crosthwaite, 2013/06/11
- [Qemu-devel] [RFT PATCH v1 28/30] ide/via: substitute ->qdev casts with DEVICE(), peter . crosthwaite, 2013/06/11
- [Qemu-devel] [RFT PATCH v1 29/30] pci-host/*: substitute ->qdev casts with DEVICE(), peter . crosthwaite, 2013/06/11
- [Qemu-devel] [RFT PATCH v1 30/30] i386/*: substitute ->qdev casts with DEVICE(), peter . crosthwaite, 2013/06/11