aboutsummaryrefslogtreecommitdiff
path: root/include/hw/i386
diff options
context:
space:
mode:
authorBlue Swirl <blauwirbel@gmail.com>2013-06-15 10:53:44 +0000
committerBlue Swirl <blauwirbel@gmail.com>2013-06-15 10:53:44 +0000
commit371a775dc18ece3ff7d77328d1ee28cb2d473706 (patch)
tree328c5e856f25c5f0176d9361b641e8061e093ae2 /include/hw/i386
parent22bfa16ed3d4c9d534dcfe6f2381a654f32296b9 (diff)
parentfef7fbc92496f5f6d2b7395263830bce15ebf410 (diff)
Merge branch 'realize-isa.v2' of git://github.com/afaerber/qemu-cpu
* 'realize-isa.v2' of git://github.com/afaerber/qemu-cpu: qdev: Drop FROM_QBUS() macro isa: QOM'ify ISADevice isa: QOM'ify ISABus i8259: Convert PICCommonState to use QOM realizefn kvm/i8259: QOM'ify some more i8259: QOM'ify some more i8254: Convert PITCommonState to QOM realizefn kvm/i8254: QOM'ify some more i8254: QOM'ify some more isa: Use realizefn for ISADevice cs4231a: QOM'ify some more gus: QOM'ify some more
Diffstat (limited to 'include/hw/i386')
-rw-r--r--include/hw/i386/pc.h30
1 files changed, 17 insertions, 13 deletions
diff --git a/include/hw/i386/pc.h b/include/hw/i386/pc.h
index fab9be51cc..7f0496764c 100644
--- a/include/hw/i386/pc.h
+++ b/include/hw/i386/pc.h
@@ -14,15 +14,17 @@
/* parallel.c */
static inline bool parallel_init(ISABus *bus, int index, CharDriverState *chr)
{
- ISADevice *dev;
+ DeviceState *dev;
+ ISADevice *isadev;
- dev = isa_try_create(bus, "isa-parallel");
- if (!dev) {
+ isadev = isa_try_create(bus, "isa-parallel");
+ if (!isadev) {
return false;
}
- qdev_prop_set_uint32(&dev->qdev, "index", index);
- qdev_prop_set_chr(&dev->qdev, "chardev", chr);
- if (qdev_init(&dev->qdev) < 0) {
+ dev = DEVICE(isadev);
+ qdev_prop_set_uint32(dev, "index", index);
+ qdev_prop_set_chr(dev, "chardev", chr);
+ if (qdev_init(dev) < 0) {
return false;
}
return true;
@@ -155,18 +157,20 @@ int isa_vga_mm_init(hwaddr vram_base,
/* ne2000.c */
static inline bool isa_ne2000_init(ISABus *bus, int base, int irq, NICInfo *nd)
{
- ISADevice *dev;
+ DeviceState *dev;
+ ISADevice *isadev;
qemu_check_nic_model(nd, "ne2k_isa");
- dev = isa_try_create(bus, "ne2k_isa");
- if (!dev) {
+ isadev = isa_try_create(bus, "ne2k_isa");
+ if (!isadev) {
return false;
}
- qdev_prop_set_uint32(&dev->qdev, "iobase", base);
- qdev_prop_set_uint32(&dev->qdev, "irq", irq);
- qdev_set_nic_properties(&dev->qdev, nd);
- qdev_init_nofail(&dev->qdev);
+ dev = DEVICE(isadev);
+ qdev_prop_set_uint32(dev, "iobase", base);
+ qdev_prop_set_uint32(dev, "irq", irq);
+ qdev_set_nic_properties(dev, nd);
+ qdev_init_nofail(dev);
return true;
}