[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-ppc] [PULL 37/45] net: lance: convert SysBus init method to a
From: |
David Gibson |
Subject: |
Re: [Qemu-ppc] [PULL 37/45] net: lance: convert SysBus init method to a realize method |
Date: |
Tue, 23 Oct 2018 16:24:23 +0100 |
User-agent: |
Mutt/1.10.1 (2018-07-13) |
On Thu, Oct 18, 2018 at 05:04:14PM -0300, Eduardo Habkost wrote:
> From: Cédric Le Goater <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>
Reviewed-by: David Gibson <address@hidden>
> ---
> hw/net/lance.c | 8 +++-----
> 1 file changed, 3 insertions(+), 5 deletions(-)
>
> diff --git a/hw/net/lance.c b/hw/net/lance.c
> index a08d5ac6a8..f987b2fd18 100644
> --- a/hw/net/lance.c
> +++ b/hw/net/lance.c
> @@ -97,9 +97,9 @@ static const VMStateDescription vmstate_lance = {
> }
> };
>
> -static int lance_init(SysBusDevice *sbd)
> +static void lance_realize(DeviceState *dev, Error **errp)
> {
> - DeviceState *dev = DEVICE(sbd);
> + SysBusDevice *sbd = SYS_BUS_DEVICE(dev);
> SysBusPCNetState *d = SYSBUS_PCNET(dev);
> PCNetState *s = &d->state;
>
> @@ -115,7 +115,6 @@ static int lance_init(SysBusDevice *sbd)
> s->phys_mem_read = ledma_memory_read;
> s->phys_mem_write = ledma_memory_write;
> pcnet_common_init(dev, s, &net_lance_info);
> - return 0;
> }
>
> static void lance_reset(DeviceState *dev)
> @@ -144,9 +143,8 @@ static Property lance_properties[] = {
> static void lance_class_init(ObjectClass *klass, void *data)
> {
> DeviceClass *dc = DEVICE_CLASS(klass);
> - SysBusDeviceClass *k = SYS_BUS_DEVICE_CLASS(klass);
>
> - k->init = lance_init;
> + dc->realize = lance_realize;
> set_bit(DEVICE_CATEGORY_NETWORK, dc->categories);
> dc->fw_name = "ethernet";
> dc->reset = lance_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 29/45] memory-device: add device class function set_addr(), (continued)
- [Qemu-ppc] [PULL 29/45] memory-device: add device class function set_addr(), Eduardo Habkost, 2018/10/18
- [Qemu-ppc] [PULL 28/45] memory-device: drop get_region_size(), Eduardo Habkost, 2018/10/18
- [Qemu-ppc] [PULL 31/45] memory-device: complete factoring out plug handling, Eduardo Habkost, 2018/10/18
- [Qemu-ppc] [PULL 30/45] memory-device: complete factoring out pre_plug handling, Eduardo Habkost, 2018/10/18
- [Qemu-ppc] [PULL 32/45] memory-device: complete factoring out unplug handling, Eduardo Habkost, 2018/10/18
- [Qemu-ppc] [PULL 33/45] memory-device: trace when pre_plugging/plugging/unplugging, Eduardo Habkost, 2018/10/18
- [Qemu-ppc] [PULL 34/45] net: etraxfs_eth: convert SysBus init method to a realize method, Eduardo Habkost, 2018/10/18
- [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
- Re: [Qemu-ppc] [PULL 37/45] net: lance: convert SysBus init method to a realize method,
David Gibson <=
- [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