aboutsummaryrefslogtreecommitdiff
path: root/hw/xgmac.c
diff options
context:
space:
mode:
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(),
}