Patchwork [v2,20/30] misc/vfio: substitute ->qdev casts with DEVICE()

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

Comments

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

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

 hw/misc/vfio.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

Patch

diff --git a/hw/misc/vfio.c b/hw/misc/vfio.c
index 52fb036..8e3524f 100644
--- a/hw/misc/vfio.c
+++ b/hw/misc/vfio.c
@@ -3074,7 +3074,7 @@  static int vfio_initfn(PCIDevice *pdev)
         }
     }
 
-    add_boot_device_path(vdev->bootindex, &pdev->qdev, NULL);
+    add_boot_device_path(vdev->bootindex, DEVICE(pdev), NULL);
 
     return 0;
 
@@ -3108,7 +3108,7 @@  static void vfio_exitfn(PCIDevice *pdev)
 
 static void vfio_pci_reset(DeviceState *dev)
 {
-    PCIDevice *pdev = DO_UPCAST(PCIDevice, qdev, dev);
+    PCIDevice *pdev = PCI_DEVICE(dev);
     VFIODevice *vdev = DO_UPCAST(VFIODevice, pdev, pdev);
     uint16_t cmd;