qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-devel] [PATCH v2 29/30] pci-host/*: substitute ->qdev casts with D


From: peter . crosthwaite
Subject: [Qemu-devel] [PATCH v2 29/30] pci-host/*: substitute ->qdev casts with DEVICE()
Date: Mon, 24 Jun 2013 17:11:26 +1000

From: Peter Crosthwaite <address@hidden>

Signed-off-by: Peter Crosthwaite <address@hidden>
---

 hw/pci-bridge/dec.c | 2 +-
 hw/pci-host/apb.c   | 4 ++--
 hw/pci-host/q35.c   | 4 ++--
 3 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/hw/pci-bridge/dec.c b/hw/pci-bridge/dec.c
index cff458b..1e5611d 100644
--- a/hw/pci-bridge/dec.c
+++ b/hw/pci-bridge/dec.c
@@ -88,7 +88,7 @@ PCIBus *pci_dec_21154_init(PCIBus *parent_bus, int devfn)
                                    "dec-21154-p2p-bridge");
     br = DO_UPCAST(PCIBridge, dev, dev);
     pci_bridge_map_irq(br, "DEC 21154 PCI-PCI bridge", dec_map_irq);
-    qdev_init_nofail(&dev->qdev);
+    qdev_init_nofail(DEVICE(dev));
     return pci_bridge_get_sec_bus(br);
 }
 
diff --git a/hw/pci-host/apb.c b/hw/pci-host/apb.c
index e099655..f3987ff 100644
--- a/hw/pci-host/apb.c
+++ b/hw/pci-host/apb.c
@@ -467,7 +467,7 @@ PCIBus *pci_apb_init(hwaddr special_base,
     br = DO_UPCAST(PCIBridge, dev, pci_dev);
     pci_bridge_map_irq(br, "Advanced PCI Bus secondary bridge 1",
                        pci_apb_map_irq);
-    qdev_init_nofail(&pci_dev->qdev);
+    qdev_init_nofail(DEVICE(dev));
     *bus2 = pci_bridge_get_sec_bus(br);
 
     pci_dev = pci_create_multifunction(d->bus, PCI_DEVFN(1, 1), true,
@@ -475,7 +475,7 @@ PCIBus *pci_apb_init(hwaddr special_base,
     br = DO_UPCAST(PCIBridge, dev, pci_dev);
     pci_bridge_map_irq(br, "Advanced PCI Bus secondary bridge 2",
                        pci_apb_map_irq);
-    qdev_init_nofail(&pci_dev->qdev);
+    qdev_init_nofail(DEVICE(pci_dev));
     *bus3 = pci_bridge_get_sec_bus(br);
 
     return d->bus;
diff --git a/hw/pci-host/q35.c b/hw/pci-host/q35.c
index 24df6b5..d04471c 100644
--- a/hw/pci-host/q35.c
+++ b/hw/pci-host/q35.c
@@ -104,8 +104,8 @@ static const TypeInfo q35_host_info = {
 /* PCIe MMCFG */
 static void mch_update_pciexbar(MCHPCIState *mch)
 {
-    PCIDevice *pci_dev = &mch->d;
-    BusState *bus = qdev_get_parent_bus(&pci_dev->qdev);
+    PCIDevice *pci_dev = PCI_DEVICE(mch);
+    BusState *bus = qdev_get_parent_bus(DEVICE(pci_dev));
     DeviceState *qdev = bus->parent;
     Q35PCIHost *s = Q35_HOST_DEVICE(qdev);
 
-- 
1.8.3.rc1.44.gb387c77.dirty




reply via email to

[Prev in Thread] Current Thread [Next in Thread]