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/intc | |
parent | 2ae0e48d5fd2cb7c5bc5c392edf2dc33ac2959d0 (diff) | |
download | qemu-4a17cc4f285d7ffe41847bf728cd88c736237416.zip qemu-4a17cc4f285d7ffe41847bf728cd88c736237416.tar.gz qemu-4a17cc4f285d7ffe41847bf728cd88c736237416.tar.bz2 |
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/intc')
-rw-r--r-- | hw/intc/i8259_common.c | 22 |
1 files changed, 12 insertions, 10 deletions
diff --git a/hw/intc/i8259_common.c b/hw/intc/i8259_common.c index 7613547..803d037 100644 --- a/hw/intc/i8259_common.c +++ b/hw/intc/i8259_common.c @@ -80,16 +80,18 @@ static void pic_common_realize(DeviceState *dev, Error **errp) ISADevice *i8259_init_chip(const char *name, ISABus *bus, bool master) { - ISADevice *dev; - - dev = isa_create(bus, name); - qdev_prop_set_uint32(&dev->qdev, "iobase", master ? 0x20 : 0xa0); - qdev_prop_set_uint32(&dev->qdev, "elcr_addr", master ? 0x4d0 : 0x4d1); - qdev_prop_set_uint8(&dev->qdev, "elcr_mask", master ? 0xf8 : 0xde); - qdev_prop_set_bit(&dev->qdev, "master", master); - qdev_init_nofail(&dev->qdev); - - return dev; + DeviceState *dev; + ISADevice *isadev; + + isadev = isa_create(bus, name); + dev = DEVICE(isadev); + qdev_prop_set_uint32(dev, "iobase", master ? 0x20 : 0xa0); + qdev_prop_set_uint32(dev, "elcr_addr", master ? 0x4d0 : 0x4d1); + qdev_prop_set_uint8(dev, "elcr_mask", master ? 0xf8 : 0xde); + qdev_prop_set_bit(dev, "master", master); + qdev_init_nofail(dev); + + return isadev; } static const VMStateDescription vmstate_pic_common = { |