[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-ppc] [PULL 42/45] net: stellaris_enet: convert SysBus init method
From: |
Eduardo Habkost |
Subject: |
[Qemu-ppc] [PULL 42/45] net: stellaris_enet: convert SysBus init method to a realize method |
Date: |
Thu, 18 Oct 2018 17:04:19 -0300 |
From: Cédric Le Goater <address@hidden>
Cc: Peter Maydell <address@hidden>
Cc: address@hidden
Signed-off-by: Cédric Le Goater <address@hidden>
Reviewed-by: Peter Maydell <address@hidden>
Reviewed-by: Philippe Mathieu-Daudé <address@hidden>
Message-Id: <address@hidden>
Signed-off-by: Eduardo Habkost <address@hidden>
---
hw/net/stellaris_enet.c | 8 +++-----
1 file changed, 3 insertions(+), 5 deletions(-)
diff --git a/hw/net/stellaris_enet.c b/hw/net/stellaris_enet.c
index 165562d788..3ee1e0f8a4 100644
--- a/hw/net/stellaris_enet.c
+++ b/hw/net/stellaris_enet.c
@@ -473,9 +473,9 @@ static NetClientInfo net_stellaris_enet_info = {
.receive = stellaris_enet_receive,
};
-static int stellaris_enet_init(SysBusDevice *sbd)
+static void stellaris_enet_realize(DeviceState *dev, Error **errp)
{
- DeviceState *dev = DEVICE(sbd);
+ SysBusDevice *sbd = SYS_BUS_DEVICE(dev);
stellaris_enet_state *s = STELLARIS_ENET(dev);
memory_region_init_io(&s->mmio, OBJECT(s), &stellaris_enet_ops, s,
@@ -489,7 +489,6 @@ static int stellaris_enet_init(SysBusDevice *sbd)
qemu_format_nic_info_str(qemu_get_queue(s->nic), s->conf.macaddr.a);
stellaris_enet_reset(s);
- return 0;
}
static Property stellaris_enet_properties[] = {
@@ -500,9 +499,8 @@ static Property stellaris_enet_properties[] = {
static void stellaris_enet_class_init(ObjectClass *klass, void *data)
{
DeviceClass *dc = DEVICE_CLASS(klass);
- SysBusDeviceClass *k = SYS_BUS_DEVICE_CLASS(klass);
- k->init = stellaris_enet_init;
+ dc->realize = stellaris_enet_realize;
dc->props = stellaris_enet_properties;
dc->vmsd = &vmstate_stellaris_enet;
}
--
2.18.0.rc1.1.g3f1ff2140
- [Qemu-ppc] [PULL 36/45] net: lan9118: convert SysBus init method to a realize method, (continued)
- [Qemu-ppc] [PULL 36/45] net: lan9118: convert SysBus init method to a realize method, Eduardo Habkost, 2018/10/18
- [Qemu-ppc] [PULL 38/45] net: milkymist_minimac2: convert SysBus init method to a realize method, Eduardo Habkost, 2018/10/18
- [Qemu-ppc] [PULL 39/45] net: mipsnet: convert SysBus init method to a realize method, Eduardo Habkost, 2018/10/18
- [Qemu-ppc] [PULL 40/45] net: opencores_eth: convert SysBus init method to a realize method, Eduardo Habkost, 2018/10/18
- [Qemu-ppc] [PULL 41/45] net: smc91c111: convert SysBus init method to a realize method, Eduardo Habkost, 2018/10/18
- [Qemu-ppc] [PULL 42/45] net: stellaris_enet: convert SysBus init method to a realize method,
Eduardo Habkost <=
- [Qemu-ppc] [PULL 43/45] net: stellaris_enet: add a reset method, Eduardo Habkost, 2018/10/18
- [Qemu-ppc] [PULL 44/45] net: xgmac: convert SysBus init method to a realize method, Eduardo Habkost, 2018/10/18
- [Qemu-ppc] [PULL 45/45] numa: Clean up error reporting in parse_numa(), Eduardo Habkost, 2018/10/18
- Re: [Qemu-ppc] [PULL 00/45] Machine queue, 2018-10-18, Peter Maydell, 2018/10/19