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

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

Comments

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

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

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

Patch

diff --git a/hw/ide/via.c b/hw/ide/via.c
index 5fe053c..b81e1fe 100644
--- a/hw/ide/via.c
+++ b/hw/ide/via.c
@@ -158,7 +158,7 @@  static void vt82c686b_init_ports(PCIIDEState *d) {
     int i;
 
     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_init_ioport(&d->bus[i], NULL, port_info[i].iobase,
                         port_info[i].iobase2);
         ide_init2(&d->bus[i], isa_get_irq(NULL, port_info[i].isairq));
@@ -183,7 +183,7 @@  static int vt82c686b_ide_initfn(PCIDevice *dev)
     bmdma_setup_bar(d);
     pci_register_bar(&d->dev, 4, PCI_BASE_ADDRESS_SPACE_IO, &d->bmdma_bar);
 
-    vmstate_register(&dev->qdev, 0, &vmstate_ide_pci, d);
+    vmstate_register(DEVICE(dev), 0, &vmstate_ide_pci, d);
 
     vt82c686b_init_ports(d);