aboutsummaryrefslogtreecommitdiff
path: root/hw/char/serial-isa.c
diff options
context:
space:
mode:
authorAndreas Färber <afaerber@suse.de>2013-06-07 13:49:13 +0200
committerAndreas Färber <afaerber@suse.de>2013-06-07 14:55:33 +0200
commit4a17cc4f285d7ffe41847bf728cd88c736237416 (patch)
tree8660ca33cdb5f9852502a9287587ff27b5a529bc /hw/char/serial-isa.c
parent2ae0e48d5fd2cb7c5bc5c392edf2dc33ac2959d0 (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/char/serial-isa.c')
-rw-r--r--hw/char/serial-isa.c14
1 files changed, 8 insertions, 6 deletions
diff --git a/hw/char/serial-isa.c b/hw/char/serial-isa.c
index 6e7e0dd057..e06a802e24 100644
--- a/hw/char/serial-isa.c
+++ b/hw/char/serial-isa.c
@@ -120,15 +120,17 @@ type_init(serial_register_types)
bool serial_isa_init(ISABus *bus, int index, CharDriverState *chr)
{
- ISADevice *dev;
+ DeviceState *dev;
+ ISADevice *isadev;
- dev = isa_try_create(bus, TYPE_ISA_SERIAL);
- if (!dev) {
+ isadev = isa_try_create(bus, TYPE_ISA_SERIAL);
+ 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;