Patchwork [v2,27/30] ide/cmd646: substitute ->qdev casts with DEVICE()

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

Comments

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

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

 hw/ide/cmd646.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

Patch

diff --git a/hw/ide/cmd646.c b/hw/ide/cmd646.c
index a73eb9a..9544c1f 100644
--- a/hw/ide/cmd646.c
+++ b/hw/ide/cmd646.c
@@ -281,7 +281,7 @@  static int pci_cmd646_ide_initfn(PCIDevice *dev)
 
     irq = qemu_allocate_irqs(cmd646_set_irq, d, 2);
     for (i = 0; i < 2; i++) {
-        ide_bus_new(&d->bus[i], &d->dev.qdev, i, 2);
+        ide_bus_new(&d->bus[i], DEVICE(d), i, 2);
         ide_init2(&d->bus[i], irq[i]);
 
         bmdma_init(&d->bus[i], &d->bmdma[i], d);
@@ -290,7 +290,7 @@  static int pci_cmd646_ide_initfn(PCIDevice *dev)
                                          &d->bmdma[i].dma);
     }
 
-    vmstate_register(&dev->qdev, 0, &vmstate_ide_pci, d);
+    vmstate_register(DEVICE(dev), 0, &vmstate_ide_pci, d);
     qemu_register_reset(cmd646_reset, d);
     return 0;
 }
@@ -317,8 +317,8 @@  void pci_cmd646_ide_init(PCIBus *bus, DriveInfo **hd_table,
     PCIDevice *dev;
 
     dev = pci_create(bus, -1, "cmd646-ide");
-    qdev_prop_set_uint32(&dev->qdev, "secondary", secondary_ide_enabled);
-    qdev_init_nofail(&dev->qdev);
+    qdev_prop_set_uint32(DEVICE(dev), "secondary", secondary_ide_enabled);
+    qdev_init_nofail(DEVICE(dev));
 
     pci_ide_create_devs(dev, hd_table);
 }