diff options
author | Andreas Färber <afaerber@suse.de> | 2013-06-07 13:49:13 +0200 |
---|---|---|
committer | Andreas Färber <afaerber@suse.de> | 2013-06-07 14:55:33 +0200 |
commit | 4a17cc4f285d7ffe41847bf728cd88c736237416 (patch) | |
tree | 8660ca33cdb5f9852502a9287587ff27b5a529bc /hw/i386 | |
parent | 2ae0e48d5fd2cb7c5bc5c392edf2dc33ac2959d0 (diff) |
isa: QOM'ify ISADevice
Rename its parent field and use DEVICE() where necessary.
Signed-off-by: Andreas Färber <afaerber@suse.de>
Diffstat (limited to 'hw/i386')
-rw-r--r-- | hw/i386/pc.c | 9 | ||||
-rw-r--r-- | hw/i386/pc_piix.c | 2 |
2 files changed, 6 insertions, 5 deletions
diff --git a/hw/i386/pc.c b/hw/i386/pc.c index e9c91e44a1..0ad062c093 100644 --- a/hw/i386/pc.c +++ b/hw/i386/pc.c @@ -1095,7 +1095,7 @@ DeviceState *pc_vga_init(ISABus *isa_bus, PCIBus *pci_bus) dev = pcidev ? &pcidev->qdev : NULL; } else if (isa_bus) { ISADevice *isadev = isa_vga_init(isa_bus); - dev = isadev ? &isadev->qdev : NULL; + dev = isadev ? DEVICE(isadev) : NULL; } return dev; } @@ -1182,7 +1182,7 @@ void pc_basic_device_init(ISABus *isa_bus, qemu_irq *gsi, } if (hpet) { /* connect PIT to output control line of the HPET */ - qdev_connect_gpio_out(hpet, 0, qdev_get_gpio_in(&pit->qdev, 0)); + qdev_connect_gpio_out(hpet, 0, qdev_get_gpio_in(DEVICE(pit), 0)); } pcspk_init(isa_bus, pit); } @@ -1210,8 +1210,9 @@ void pc_basic_device_init(ISABus *isa_bus, qemu_irq *gsi, vmmouse = NULL; } if (vmmouse) { - qdev_prop_set_ptr(&vmmouse->qdev, "ps2_mouse", i8042); - qdev_init_nofail(&vmmouse->qdev); + DeviceState *dev = DEVICE(vmmouse); + qdev_prop_set_ptr(dev, "ps2_mouse", i8042); + qdev_init_nofail(dev); } port92 = isa_create_simple(isa_bus, "port92"); port92_init(port92, &a20_line[1]); diff --git a/hw/i386/pc_piix.c b/hw/i386/pc_piix.c index d6185705a6..af1e9afb04 100644 --- a/hw/i386/pc_piix.c +++ b/hw/i386/pc_piix.c @@ -199,7 +199,7 @@ static void pc_init1(MemoryRegion *system_memory, dev = isa_ide_init(isa_bus, ide_iobase[i], ide_iobase2[i], ide_irq[i], hd[MAX_IDE_DEVS * i], hd[MAX_IDE_DEVS * i + 1]); - idebus[i] = qdev_get_child_bus(&dev->qdev, "ide.0"); + idebus[i] = qdev_get_child_bus(DEVICE(dev), "ide.0"); } } |