mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-02 23:33:54 -06:00
cpu: Use cpu_class_set_parent_reset()
Convert all targets to use cpu_class_set_parent_reset() with the following coccinelle script: @@ type CPUParentClass; CPUParentClass *pcc; CPUClass *cc; identifier parent_fn; identifier child_fn; @@ +cpu_class_set_parent_reset(cc, child_fn, &pcc->parent_fn); -pcc->parent_fn = cc->reset; ... -cc->reset = child_fn; Signed-off-by: Greg Kurz <groug@kaod.org> Acked-by: David Gibson <david@gibson.dropbear.id.au> Reviewed-by: Alistair Francis <alistair.francis@wdc.com> Reviewed-by: Cornelia Huck <cohuck@redhat.com> Acked-by: David Hildenbrand <david@redhat.com> Message-Id: <157650847817.354886.7047137349018460524.stgit@bahia.lan> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
This commit is contained in:
parent
ef0a6249a8
commit
bc9888f759
18 changed files with 18 additions and 36 deletions
|
@ -218,8 +218,7 @@ static void lm32_cpu_class_init(ObjectClass *oc, void *data)
|
|||
|
||||
device_class_set_parent_realize(dc, lm32_cpu_realizefn,
|
||||
&lcc->parent_realize);
|
||||
lcc->parent_reset = cc->reset;
|
||||
cc->reset = lm32_cpu_reset;
|
||||
cpu_class_set_parent_reset(cc, lm32_cpu_reset, &lcc->parent_reset);
|
||||
|
||||
cc->class_by_name = lm32_cpu_class_by_name;
|
||||
cc->has_work = lm32_cpu_has_work;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue