[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-ppc] [PULL 40/45] net: opencores_eth: convert SysBus init meth
From: |
David Gibson |
Subject: |
Re: [Qemu-ppc] [PULL 40/45] net: opencores_eth: convert SysBus init method to a realize method |
Date: |
Tue, 23 Oct 2018 16:25:35 +0100 |
User-agent: |
Mutt/1.10.1 (2018-07-13) |
On Thu, Oct 18, 2018 at 05:04:17PM -0300, Eduardo Habkost wrote:
> From: Cédric Le Goater <address@hidden>
>
> Cc: Max Filippov <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>
> Acked-by: Max Filippov <address@hidden>
> Signed-off-by: Eduardo Habkost <address@hidden>
Reviewed-by: David Gibson <address@hidden>
> ---
> hw/net/opencores_eth.c | 8 +++-----
> 1 file changed, 3 insertions(+), 5 deletions(-)
>
> diff --git a/hw/net/opencores_eth.c b/hw/net/opencores_eth.c
> index d42b79c08c..d6f54f8d82 100644
> --- a/hw/net/opencores_eth.c
> +++ b/hw/net/opencores_eth.c
> @@ -715,9 +715,9 @@ static const MemoryRegionOps open_eth_desc_ops = {
> .write = open_eth_desc_write,
> };
>
> -static int sysbus_open_eth_init(SysBusDevice *sbd)
> +static void sysbus_open_eth_realize(DeviceState *dev, Error **errp)
> {
> - DeviceState *dev = DEVICE(sbd);
> + SysBusDevice *sbd = SYS_BUS_DEVICE(dev);
> OpenEthState *s = OPEN_ETH(dev);
>
> memory_region_init_io(&s->reg_io, OBJECT(dev), &open_eth_reg_ops, s,
> @@ -732,7 +732,6 @@ static int sysbus_open_eth_init(SysBusDevice *sbd)
>
> s->nic = qemu_new_nic(&net_open_eth_info, &s->conf,
> object_get_typename(OBJECT(s)), dev->id, s);
> - return 0;
> }
>
> static void qdev_open_eth_reset(DeviceState *dev)
> @@ -750,9 +749,8 @@ static Property open_eth_properties[] = {
> static void open_eth_class_init(ObjectClass *klass, void *data)
> {
> DeviceClass *dc = DEVICE_CLASS(klass);
> - SysBusDeviceClass *k = SYS_BUS_DEVICE_CLASS(klass);
>
> - k->init = sysbus_open_eth_init;
> + dc->realize = sysbus_open_eth_realize;
> set_bit(DEVICE_CATEGORY_NETWORK, dc->categories);
> dc->desc = "Opencores 10/100 Mbit Ethernet";
> dc->reset = qdev_open_eth_reset;
--
David Gibson | I'll have my music baroque, and my code
david AT gibson.dropbear.id.au | minimalist, thank you. NOT _the_ _other_
| _way_ _around_!
http://www.ozlabs.org/~dgibson
signature.asc
Description: PGP signature
- [Qemu-ppc] [PULL 35/45] net: etraxfs_eth: add a reset method, (continued)
- [Qemu-ppc] [PULL 35/45] net: etraxfs_eth: add a reset method, Eduardo Habkost, 2018/10/18
- [Qemu-ppc] [PULL 37/45] net: lance: convert SysBus init method to a realize method, Eduardo Habkost, 2018/10/18
- [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
- Re: [Qemu-ppc] [PULL 40/45] net: opencores_eth: convert SysBus init method to a realize method,
David Gibson <=
- [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, 2018/10/18
- [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