qemu-trivial
[Top][All Lists]
Advanced

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

Re: [PATCH] target/avr/cpu: Use device_class_set_parent_realize()


From: Laurent Vivier
Subject: Re: [PATCH] target/avr/cpu: Use device_class_set_parent_realize()
Date: Sun, 14 Feb 2021 00:33:05 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.7.0

Le 01/02/2021 à 09:03, Philippe Mathieu-Daudé a écrit :
> Change generated automatically using the Coccinelle
> patch included in commit bf853881690 ("qdev: use
> device_class_set_parent_realize/unrealize/reset()")
> 
> Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
> ---
>  target/avr/cpu.c | 4 +---
>  1 file changed, 1 insertion(+), 3 deletions(-)
> 
> diff --git a/target/avr/cpu.c b/target/avr/cpu.c
> index 6f3d5a9e4a7..e60036e41ef 100644
> --- a/target/avr/cpu.c
> +++ b/target/avr/cpu.c
> @@ -190,9 +190,7 @@ static void avr_cpu_class_init(ObjectClass *oc, void 
> *data)
>      CPUClass *cc = CPU_CLASS(oc);
>      AVRCPUClass *mcc = AVR_CPU_CLASS(oc);
>  
> -    mcc->parent_realize = dc->realize;
> -    dc->realize = avr_cpu_realizefn;
> -
> +    device_class_set_parent_realize(dc, avr_cpu_realizefn, 
> &mcc->parent_realize);
>      device_class_set_parent_reset(dc, avr_cpu_reset, &mcc->parent_reset);
>  
>      cc->class_by_name = avr_cpu_class_by_name;
> 


Applied to my trivial-patches branch.

Thanks,
Laurent



reply via email to

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