qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PULL 41/45] net: smc91c111: convert SysBus init method


From: David Gibson
Subject: Re: [Qemu-devel] [PULL 41/45] net: smc91c111: convert SysBus init method to a realize method
Date: Tue, 23 Oct 2018 16:25:57 +0100
User-agent: Mutt/1.10.1 (2018-07-13)

On Thu, Oct 18, 2018 at 05:04:18PM -0300, Eduardo Habkost wrote:
> From: Cédric Le Goater <address@hidden>
> 
> Signed-off-by: Cédric Le Goater <address@hidden>
> Message-Id: <address@hidden>
> Reviewed-by: Philippe Mathieu-Daudé <address@hidden>
> Signed-off-by: Eduardo Habkost <address@hidden>

Reviewed-by: David Gibson <address@hidden>

> ---
>  hw/net/smc91c111.c | 8 +++-----
>  1 file changed, 3 insertions(+), 5 deletions(-)
> 
> diff --git a/hw/net/smc91c111.c b/hw/net/smc91c111.c
> index d2fd2040e8..99da2d9297 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;

-- 
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

Attachment: signature.asc
Description: PGP signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]