diff options
author | Blue Swirl <blauwirbel@gmail.com> | 2013-06-15 10:53:44 +0000 |
---|---|---|
committer | Blue Swirl <blauwirbel@gmail.com> | 2013-06-15 10:53:44 +0000 |
commit | 371a775dc18ece3ff7d77328d1ee28cb2d473706 (patch) | |
tree | 328c5e856f25c5f0176d9361b641e8061e093ae2 /hw/net | |
parent | 22bfa16ed3d4c9d534dcfe6f2381a654f32296b9 (diff) | |
parent | fef7fbc92496f5f6d2b7395263830bce15ebf410 (diff) | |
download | qemu-371a775dc18ece3ff7d77328d1ee28cb2d473706.zip qemu-371a775dc18ece3ff7d77328d1ee28cb2d473706.tar.gz qemu-371a775dc18ece3ff7d77328d1ee28cb2d473706.tar.bz2 |
Merge branch 'realize-isa.v2' of git://github.com/afaerber/qemu-cpu
* 'realize-isa.v2' of git://github.com/afaerber/qemu-cpu:
qdev: Drop FROM_QBUS() macro
isa: QOM'ify ISADevice
isa: QOM'ify ISABus
i8259: Convert PICCommonState to use QOM realizefn
kvm/i8259: QOM'ify some more
i8259: QOM'ify some more
i8254: Convert PITCommonState to QOM realizefn
kvm/i8254: QOM'ify some more
i8254: QOM'ify some more
isa: Use realizefn for ISADevice
cs4231a: QOM'ify some more
gus: QOM'ify some more
Diffstat (limited to 'hw/net')
-rw-r--r-- | hw/net/ne2000-isa.c | 15 |
1 files changed, 7 insertions, 8 deletions
diff --git a/hw/net/ne2000-isa.c b/hw/net/ne2000-isa.c index f8e610c..9232abd 100644 --- a/hw/net/ne2000-isa.c +++ b/hw/net/ne2000-isa.c @@ -66,24 +66,23 @@ static const VMStateDescription vmstate_isa_ne2000 = { } }; -static int isa_ne2000_initfn(ISADevice *dev) +static void isa_ne2000_realizefn(DeviceState *dev, Error **errp) { + ISADevice *isadev = ISA_DEVICE(dev); ISANE2000State *isa = ISA_NE2000(dev); NE2000State *s = &isa->ne2000; ne2000_setup_io(s, 0x20); - isa_register_ioport(dev, &s->io, isa->iobase); + isa_register_ioport(isadev, &s->io, isa->iobase); - isa_init_irq(dev, &s->irq, isa->isairq); + isa_init_irq(isadev, &s->irq, isa->isairq); qemu_macaddr_default_if_unset(&s->c.macaddr); ne2000_reset(s); s->nic = qemu_new_nic(&net_ne2000_isa_info, &s->c, - object_get_typename(OBJECT(dev)), dev->qdev.id, s); + object_get_typename(OBJECT(dev)), dev->id, s); qemu_format_nic_info_str(qemu_get_queue(s->nic), s->c.macaddr.a); - - return 0; } static Property ne2000_isa_properties[] = { @@ -96,8 +95,8 @@ static Property ne2000_isa_properties[] = { static void isa_ne2000_class_initfn(ObjectClass *klass, void *data) { DeviceClass *dc = DEVICE_CLASS(klass); - ISADeviceClass *ic = ISA_DEVICE_CLASS(klass); - ic->init = isa_ne2000_initfn; + + dc->realize = isa_ne2000_realizefn; dc->props = ne2000_isa_properties; } |