Patchwork [v2,18/30] pci-bridge/*: substitute ->qdev casts with DEVICE()

login
register
mail settings
Submitter Peter Crosthwaite
Date June 24, 2013, 7:03 a.m.
Message ID <d18a1262d29575fae85fe19ba0359563103b16b8.1372055322.git.peter.crosthwaite@xilinx.com>
Download mbox | patch
Permalink /patch/253676/
State New
Headers show

Comments

Peter Crosthwaite - June 24, 2013, 7:03 a.m.
From: Peter Crosthwaite <peter.crosthwaite@xilinx.com>

Signed-off-by: Peter Crosthwaite <peter.crosthwaite@xilinx.com>
---

 hw/pci-bridge/i82801b11.c          | 2 +-
 hw/pci-bridge/ioh3420.c            | 2 +-
 hw/pci-bridge/xio3130_downstream.c | 2 +-
 hw/pci-bridge/xio3130_upstream.c   | 2 +-
 4 files changed, 4 insertions(+), 4 deletions(-)

Patch

diff --git a/hw/pci-bridge/i82801b11.c b/hw/pci-bridge/i82801b11.c
index 5807a92..8b20e27 100644
--- a/hw/pci-bridge/i82801b11.c
+++ b/hw/pci-bridge/i82801b11.c
@@ -108,7 +108,7 @@  PCIBus *ich9_d2pbr_init(PCIBus *bus, int devfn, int sec_bus)
         return NULL;
     }
     br = DO_UPCAST(PCIBridge, dev, d);
-    qdev = &br->dev.qdev;
+    qdev = DEVICE(br);
 
     snprintf(buf, sizeof(buf), "pci.%d", sec_bus);
     pci_bridge_map_irq(br, buf, pci_swizzle_map_irq_fn);
diff --git a/hw/pci-bridge/ioh3420.c b/hw/pci-bridge/ioh3420.c
index bb541eb..32f9ed6 100644
--- a/hw/pci-bridge/ioh3420.c
+++ b/hw/pci-bridge/ioh3420.c
@@ -173,7 +173,7 @@  PCIESlot *ioh3420_init(PCIBus *bus, int devfn, bool multifunction,
     }
     br = DO_UPCAST(PCIBridge, dev, d);
 
-    qdev = &br->dev.qdev;
+    qdev = DEVICE(br);
     pci_bridge_map_irq(br, bus_name, map_irq);
     qdev_prop_set_uint8(qdev, "port", port);
     qdev_prop_set_uint8(qdev, "chassis", chassis);
diff --git a/hw/pci-bridge/xio3130_downstream.c b/hw/pci-bridge/xio3130_downstream.c
index 1810dd2..6a799e2 100644
--- a/hw/pci-bridge/xio3130_downstream.c
+++ b/hw/pci-bridge/xio3130_downstream.c
@@ -140,7 +140,7 @@  PCIESlot *xio3130_downstream_init(PCIBus *bus, int devfn, bool multifunction,
     }
     br = DO_UPCAST(PCIBridge, dev, d);
 
-    qdev = &br->dev.qdev;
+    qdev = DEVICE(br);
     pci_bridge_map_irq(br, bus_name, map_irq);
     qdev_prop_set_uint8(qdev, "port", port);
     qdev_prop_set_uint8(qdev, "chassis", chassis);
diff --git a/hw/pci-bridge/xio3130_upstream.c b/hw/pci-bridge/xio3130_upstream.c
index 8e0d97a..9bb9daa 100644
--- a/hw/pci-bridge/xio3130_upstream.c
+++ b/hw/pci-bridge/xio3130_upstream.c
@@ -120,7 +120,7 @@  PCIEPort *xio3130_upstream_init(PCIBus *bus, int devfn, bool multifunction,
     }
     br = DO_UPCAST(PCIBridge, dev, d);
 
-    qdev = &br->dev.qdev;
+    qdev = DEVICE(br);
     pci_bridge_map_irq(br, bus_name, map_irq);
     qdev_prop_set_uint8(qdev, "port", port);
     qdev_init_nofail(qdev);