Patchwork [v2,17/30] pci-bridge/pci_bridge_dev: Don't use DO_UPCAST

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

Comments

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

Just use the defined PCI_DEVICE cast macro.

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

 hw/pci-bridge/pci_bridge_dev.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Patch

diff --git a/hw/pci-bridge/pci_bridge_dev.c b/hw/pci-bridge/pci_bridge_dev.c
index 971b432..c845f38 100644
--- a/hw/pci-bridge/pci_bridge_dev.c
+++ b/hw/pci-bridge/pci_bridge_dev.c
@@ -104,7 +104,7 @@  static void pci_bridge_dev_write_config(PCIDevice *d,
 
 static void qdev_pci_bridge_dev_reset(DeviceState *qdev)
 {
-    PCIDevice *dev = DO_UPCAST(PCIDevice, qdev, qdev);
+    PCIDevice *dev = PCI_DEVICE(qdev);
 
     pci_bridge_reset(qdev);
     shpc_reset(dev);