summary refs log tree commit diff stats
path: root/hw/xgmac.c
diff options
context:
space:
mode:
authorAnthony Liguori <aliguori@us.ibm.com>2012-01-24 13:12:29 -0600
committerAnthony Liguori <aliguori@us.ibm.com>2012-01-27 10:50:50 -0600
commit999e12bbe85c5dcf49bef13bce4f97399c7105f4 (patch)
tree73b6ed8633a73134e9f728baa1ed2b1dab58b5b0 /hw/xgmac.c
parent40021f08882aaef93c66c8c740087b6d3031b63a (diff)
downloadfocaccia-qemu-999e12bbe85c5dcf49bef13bce4f97399c7105f4.tar.gz
focaccia-qemu-999e12bbe85c5dcf49bef13bce4f97399c7105f4.zip
sysbus: apic: ioapic: convert to QEMU Object Model
This converts three devices because apic and ioapic are subclasses of sysbus.
Converting subclasses independently of their base class is prohibitively hard.

Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Diffstat (limited to 'hw/xgmac.c')
-rw-r--r--hw/xgmac.c19
1 files changed, 13 insertions, 6 deletions
diff --git a/hw/xgmac.c b/hw/xgmac.c
index ef0ca247e5..73840c9272 100644
--- a/hw/xgmac.c
+++ b/hw/xgmac.c
@@ -403,12 +403,19 @@ static int xgmac_enet_init(SysBusDevice *dev)
     return 0;
 }
 
-static SysBusDeviceInfo xgmac_enet_info = {
-    .init = xgmac_enet_init,
-    .qdev.name  = "xgmac",
-    .qdev.size  = sizeof(struct XgmacState),
-    .qdev.vmsd = &vmstate_xgmac,
-    .qdev.props = (Property[]) {
+static void xgmac_enet_class_init(ObjectClass *klass, void *data)
+{
+    SysBusDeviceClass *sbc = SYS_BUS_DEVICE_CLASS(klass);
+
+    sbc->init = xgmac_enet_init;
+}
+
+static DeviceInfo xgmac_enet_info = {
+    .name  = "xgmac",
+    .size  = sizeof(struct XgmacState),
+    .vmsd = &vmstate_xgmac,
+    .class_init = xgmac_enet_class_init,
+    .props = (Property[]) {
         DEFINE_NIC_PROPERTIES(struct XgmacState, conf),
         DEFINE_PROP_END_OF_LIST(),
     }