aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCédric Le Goater <clg@kaod.org>2018-10-01 08:38:00 +0200
committerEduardo Habkost <ehabkost@redhat.com>2018-10-24 06:44:59 -0300
commitf5ac82ce6c88f4ffe1171df32e1aa188784ba841 (patch)
tree8ff720b7f1dd40e83a5d8172455d0a1b2808124a
parent842fac8e20f986183c90b604ef412ef8cd17a2d2 (diff)
downloadqemu-f5ac82ce6c88f4ffe1171df32e1aa188784ba841.zip
qemu-f5ac82ce6c88f4ffe1171df32e1aa188784ba841.tar.gz
qemu-f5ac82ce6c88f4ffe1171df32e1aa188784ba841.tar.bz2
net: smc91c111: convert SysBus init method to a realize method
Signed-off-by: Cédric Le Goater <clg@kaod.org> Message-Id: <20181001063803.22330-9-clg@kaod.org> Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com> Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
-rw-r--r--hw/net/smc91c111.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/hw/net/smc91c111.c b/hw/net/smc91c111.c
index d2fd204..99da2d9 100644
--- a/hw/net/smc91c111.c
+++ b/hw/net/smc91c111.c
@@ -766,9 +766,9 @@ static NetClientInfo net_smc91c111_info = {
.receive = smc91c111_receive,
};
-static int smc91c111_init1(SysBusDevice *sbd)
+static void smc91c111_realize(DeviceState *dev, Error **errp)
{
- DeviceState *dev = DEVICE(sbd);
+ SysBusDevice *sbd = SYS_BUS_DEVICE(dev);
smc91c111_state *s = SMC91C111(dev);
memory_region_init_io(&s->mmio, OBJECT(s), &smc91c111_mem_ops, s,
@@ -780,7 +780,6 @@ static int smc91c111_init1(SysBusDevice *sbd)
object_get_typename(OBJECT(dev)), dev->id, s);
qemu_format_nic_info_str(qemu_get_queue(s->nic), s->conf.macaddr.a);
/* ??? Save/restore. */
- return 0;
}
static Property smc91c111_properties[] = {
@@ -791,9 +790,8 @@ static Property smc91c111_properties[] = {
static void smc91c111_class_init(ObjectClass *klass, void *data)
{
DeviceClass *dc = DEVICE_CLASS(klass);
- SysBusDeviceClass *k = SYS_BUS_DEVICE_CLASS(klass);
- k->init = smc91c111_init1;
+ dc->realize = smc91c111_realize;
dc->reset = smc91c111_reset;
dc->vmsd = &vmstate_smc91c111;
dc->props = smc91c111_properties;