aboutsummaryrefslogtreecommitdiff
path: root/hw/wdt_ib700.c
diff options
context:
space:
mode:
authorAnthony Liguori <aliguori@us.ibm.com>2011-12-04 11:52:49 -0600
committerAnthony Liguori <aliguori@us.ibm.com>2012-01-27 10:50:47 -0600
commit8f04ee0882aec9fe91fb70f767edf5dacff59835 (patch)
tree01ebc9678569233858c2343c9cb04e62c2df55ad /hw/wdt_ib700.c
parente855761ca8fa08ebe29c1e69abc6f0863a453f92 (diff)
isa: pic: convert to QEMU Object Model
This converts two devices at once because PIC subclasses ISA and converting subclasses independently is extremely hard. Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Diffstat (limited to 'hw/wdt_ib700.c')
-rw-r--r--hw/wdt_ib700.c18
1 files changed, 12 insertions, 6 deletions
diff --git a/hw/wdt_ib700.c b/hw/wdt_ib700.c
index ba1d92d615..6deb0de6cd 100644
--- a/hw/wdt_ib700.c
+++ b/hw/wdt_ib700.c
@@ -120,12 +120,18 @@ static WatchdogTimerModel model = {
.wdt_description = "iBASE 700",
};
-static ISADeviceInfo wdt_ib700_info = {
- .qdev.name = "ib700",
- .qdev.size = sizeof(IB700State),
- .qdev.vmsd = &vmstate_ib700,
- .qdev.reset = wdt_ib700_reset,
- .init = wdt_ib700_init,
+static void wdt_ib700_class_init(ObjectClass *klass, void *data)
+{
+ ISADeviceClass *ic = ISA_DEVICE_CLASS(klass);
+ ic->init = wdt_ib700_init;
+}
+
+static DeviceInfo wdt_ib700_info = {
+ .name = "ib700",
+ .size = sizeof(IB700State),
+ .vmsd = &vmstate_ib700,
+ .reset = wdt_ib700_reset,
+ .class_init = wdt_ib700_class_init,
};
static void wdt_ib700_register_devices(void)