]> git.proxmox.com Git - mirror_qemu.git/commit - target/i386/cpu.c
qdev: use device_class_set_parent_realize/unrealize/reset()
authorPhilippe Mathieu-Daudé <f4bug@amsat.org>
Sun, 14 Jan 2018 02:04:12 +0000 (23:04 -0300)
committerPaolo Bonzini <pbonzini@redhat.com>
Mon, 5 Feb 2018 12:54:38 +0000 (13:54 +0100)
commitbf853881690db8bbd1de39e4be580310a9cb0ebc
treea8d261d1094d34f03d216ced7fbdcdc29972b3a8
parent46795cf2e2f643ace9454822022ba8b1e9c0cf61
qdev: use device_class_set_parent_realize/unrealize/reset()

changes generated using the following Coccinelle patch:

  @@
  type DeviceParentClass;
  DeviceParentClass *pc;
  DeviceClass *dc;
  identifier parent_fn;
  identifier child_fn;
  @@
  (
  +device_class_set_parent_realize(dc, child_fn, &pc->parent_fn);
  -pc->parent_fn = dc->realize;
  ...
  -dc->realize = child_fn;
  |
  +device_class_set_parent_unrealize(dc, child_fn, &pc->parent_fn);
  -pc->parent_fn = dc->unrealize;
  ...
  -dc->unrealize = child_fn;
  |
  +device_class_set_parent_reset(dc, child_fn, &pc->parent_fn);
  -pc->parent_fn = dc->reset;
  ...
  -dc->reset = child_fn;
  )

Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Message-Id: <20180114020412.26160-4-f4bug@amsat.org>
Reviewed-by: Marcel Apfelbaum <marcel@redhat.com>
Acked-by: David Gibson <david@gibson.dropbear.id.au>
Acked-by: Cornelia Huck <cohuck@redhat.com>
Reviewed-by: Laurent Vivier <laurent@vivier.eu>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
37 files changed:
hw/i386/kvm/i8254.c
hw/i386/kvm/i8259.c
hw/input/adb-kbd.c
hw/input/adb-mouse.c
hw/intc/arm_gic.c
hw/intc/arm_gic_kvm.c
hw/intc/arm_gicv3.c
hw/intc/arm_gicv3_its_kvm.c
hw/intc/arm_gicv3_kvm.c
hw/intc/i8259.c
hw/net/vmxnet3.c
hw/pci-bridge/gen_pcie_root_port.c
hw/scsi/vmw_pvscsi.c
hw/timer/i8254.c
hw/vfio/amd-xgbe.c
hw/vfio/calxeda-xgmac.c
hw/virtio/virtio-pci.c
target/alpha/cpu.c
target/arm/cpu.c
target/cris/cpu.c
target/hppa/cpu.c
target/i386/cpu.c
target/lm32/cpu.c
target/m68k/cpu.c
target/microblaze/cpu.c
target/mips/cpu.c
target/moxie/cpu.c
target/nios2/cpu.c
target/openrisc/cpu.c
target/ppc/translate_init.c
target/s390x/cpu.c
target/sh4/cpu.c
target/sparc/cpu.c
target/tilegx/cpu.c
target/tricore/cpu.c
target/unicore32/cpu.c
target/xtensa/cpu.c