aboutsummaryrefslogtreecommitdiff
path: root/hw/i8259.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/i8259.c
parente855761ca8fa08ebe29c1e69abc6f0863a453f92 (diff)
downloadqemu-8f04ee0882aec9fe91fb70f767edf5dacff59835.zip
qemu-8f04ee0882aec9fe91fb70f767edf5dacff59835.tar.gz
qemu-8f04ee0882aec9fe91fb70f767edf5dacff59835.tar.bz2
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/i8259.c')
-rw-r--r--hw/i8259.c15
1 files changed, 11 insertions, 4 deletions
diff --git a/hw/i8259.c b/hw/i8259.c
index 3005ce2..e083bb6 100644
--- a/hw/i8259.c
+++ b/hw/i8259.c
@@ -472,10 +472,17 @@ qemu_irq *i8259_init(ISABus *bus, qemu_irq parent_irq)
return irq_set;
}
-static PICCommonInfo i8259_info = {
- .isadev.qdev.name = "isa-i8259",
- .isadev.qdev.reset = pic_reset,
- .init = pic_init,
+static void i8259_class_init(ObjectClass *klass, void *data)
+{
+ PICCommonClass *k = PIC_COMMON_CLASS(klass);
+
+ k->init = pic_init;
+}
+
+static DeviceInfo i8259_info = {
+ .name = "isa-i8259",
+ .reset = pic_reset,
+ .class_init = i8259_class_init,
};
static void pic_register(void)