aboutsummaryrefslogtreecommitdiff
path: root/hw/ne2000-isa.c
diff options
context:
space:
mode:
Diffstat (limited to 'hw/ne2000-isa.c')
-rw-r--r--hw/ne2000-isa.c16
1 files changed, 11 insertions, 5 deletions
diff --git a/hw/ne2000-isa.c b/hw/ne2000-isa.c
index 5bc5f2a40d..25a7a31d25 100644
--- a/hw/ne2000-isa.c
+++ b/hw/ne2000-isa.c
@@ -82,11 +82,17 @@ static int isa_ne2000_initfn(ISADevice *dev)
return 0;
}
-static ISADeviceInfo ne2000_isa_info = {
- .qdev.name = "ne2k_isa",
- .qdev.size = sizeof(ISANE2000State),
- .init = isa_ne2000_initfn,
- .qdev.props = (Property[]) {
+static void isa_ne2000_class_initfn(ObjectClass *klass, void *data)
+{
+ ISADeviceClass *ic = ISA_DEVICE_CLASS(klass);
+ ic->init = isa_ne2000_initfn;
+}
+
+static DeviceInfo ne2000_isa_info = {
+ .name = "ne2k_isa",
+ .size = sizeof(ISANE2000State),
+ .class_init = isa_ne2000_class_initfn,
+ .props = (Property[]) {
DEFINE_PROP_HEX32("iobase", ISANE2000State, iobase, 0x300),
DEFINE_PROP_UINT32("irq", ISANE2000State, isairq, 9),
DEFINE_NIC_PROPERTIES(ISANE2000State, ne2000.c),