qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: "Philippe Mathieu-Daudé" <f4bug@amsat.org>
To: qemu-devel@nongnu.org
Cc: qemu-trivial@nongnu.org, "Sarah Harris" <S.E.Harris@kent.ac.uk>,
	"Michael Rolnik" <mrolnik@gmail.com>,
	"Philippe Mathieu-Daudé" <f4bug@amsat.org>
Subject: [PATCH] target/avr/cpu: Use device_class_set_parent_realize()
Date: Mon,  1 Feb 2021 09:03:48 +0100	[thread overview]
Message-ID: <20210201080348.438095-1-f4bug@amsat.org> (raw)

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



             reply	other threads:[~2021-02-01  8:04 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-02-01  8:03 Philippe Mathieu-Daudé [this message]
2021-02-03  2:07 ` [PATCH] target/avr/cpu: Use device_class_set_parent_realize() Richard Henderson
2021-02-13 23:33 ` Laurent Vivier

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20210201080348.438095-1-f4bug@amsat.org \
    --to=f4bug@amsat.org \
    --cc=S.E.Harris@kent.ac.uk \
    --cc=mrolnik@gmail.com \
    --cc=qemu-devel@nongnu.org \
    --cc=qemu-trivial@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).