qemu-e2k/include/hw/misc
Markus Armbruster 3c6ef471ee sysbus: Convert to sysbus_realize() etc. with Coccinelle
Convert from qdev_realize(), qdev_realize_and_unref() with null @bus
argument to sysbus_realize(), sysbus_realize_and_unref().

Coccinelle script:

    @@
    expression dev, errp;
    @@
    -    qdev_realize(DEVICE(dev), NULL, errp);
    +    sysbus_realize(SYS_BUS_DEVICE(dev), errp);

    @@
    expression sysbus_dev, dev, errp;
    @@
    +    sysbus_dev = SYS_BUS_DEVICE(dev);
    -    qdev_realize_and_unref(dev, NULL, errp);
    +    sysbus_realize_and_unref(sysbus_dev, errp);
    -    sysbus_dev = SYS_BUS_DEVICE(dev);

    @@
    expression sysbus_dev, dev, errp;
    expression expr;
    @@
         sysbus_dev = SYS_BUS_DEVICE(dev);
         ... when != dev = expr;
    -    qdev_realize_and_unref(dev, NULL, errp);
    +    sysbus_realize_and_unref(sysbus_dev, errp);

    @@
    expression dev, errp;
    @@
    -    qdev_realize_and_unref(DEVICE(dev), NULL, errp);
    +    sysbus_realize_and_unref(SYS_BUS_DEVICE(dev), errp);

    @@
    expression dev, errp;
    @@
    -    qdev_realize_and_unref(dev, NULL, errp);
    +    sysbus_realize_and_unref(SYS_BUS_DEVICE(dev), errp);

Whitespace changes minimized manually.

Signed-off-by: Markus Armbruster <armbru@redhat.com>
Acked-by: Alistair Francis <alistair.francis@wdc.com>
Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Reviewed-by: Paolo Bonzini <pbonzini@redhat.com>
Message-Id: <20200610053247.1583243-46-armbru@redhat.com>
[Conflicts in hw/misc/empty_slot.c and hw/sparc/leon3.c resolved]
2020-06-15 22:05:28 +02:00
..
macio hw/ide: Remove now unneded #include "hw/pci/pci.h" from hw/ide.h 2020-03-17 12:22:36 -04:00
a9scu.h
allwinner-cpucfg.h hw/arm/allwinner: add CPU Configuration module 2020-03-12 16:27:33 +00:00
allwinner-h3-ccu.h hw/arm/allwinner-h3: add Clock Control Unit 2020-03-12 16:27:33 +00:00
allwinner-h3-dramc.h hw/arm/allwinner-h3: add SDRAM controller device 2020-03-12 16:27:33 +00:00
allwinner-h3-sysctrl.h hw/arm/allwinner-h3: add System Control module 2020-03-12 16:27:33 +00:00
allwinner-sid.h hw/arm/allwinner: add Security Identifier device 2020-03-12 16:27:33 +00:00
arm11scu.h
arm_integrator_debug.h
armsse-cpuid.h
armsse-mhu.h
aspeed_scu.h aspeed: Support AST2600A1 silicon revision 2020-05-11 11:00:26 +01:00
aspeed_sdmc.h arm/aspeed: actually check RAM size 2020-02-19 16:49:54 +00:00
aspeed_xdma.h hw/misc/aspeed_xdma: New device 2019-07-01 17:29:00 +01:00
auxbus.h auxbus: Eliminate aux_create_slave() 2020-06-15 22:05:28 +02:00
bcm2835_mbox_defs.h hw/arm/bcm283x: Correct the license text 2020-03-23 17:22:30 +00:00
bcm2835_mbox.h hw/arm/bcm283x: Correct the license text 2020-03-23 17:22:30 +00:00
bcm2835_mphi.h raspi: add BCM2835 SOC MPHI emulation 2020-06-05 17:23:09 +01:00
bcm2835_property.h hw/arm/bcm283x: Correct the license text 2020-03-23 17:22:30 +00:00
bcm2835_rng.h
bcm2835_thermal.h hw/misc/bcm2835_thermal: Add a dummy BCM2835 thermal sensor 2019-10-25 13:09:27 +01:00
cbus.h Include hw/irq.h a lot less 2019-08-16 13:31:52 +02:00
empty_slot.h hw/misc/empty_slot: Name the slots when created 2020-06-09 06:59:44 +02:00
grlib_ahb_apb_pnp.h leon3: introduce the plug and play mechanism 2019-05-17 09:17:11 +01:00
imx6_ccm.h
imx6_src.h
imx6ul_ccm.h
imx7_ccm.h
imx7_gpr.h
imx7_snvs.h
imx25_ccm.h
imx31_ccm.h
imx_ccm.h
imx_rngc.h i.MX: add an emulation for RNGC 2020-01-17 14:27:16 +00:00
iotkit-secctl.h
iotkit-sysctl.h
iotkit-sysinfo.h
ivshmem.h
mac_via.h q800: add a block backend to the PRAM 2020-01-07 13:35:53 +01:00
mips_cmgcr.h include: Make headers more self-contained 2019-08-16 13:31:51 +02:00
mips_cpc.h include: Make headers more self-contained 2019-08-16 13:31:51 +02:00
mips_itu.h
mos6522.h mos6522: remove anh register 2020-01-08 11:01:59 +11:00
mps2-fpgaio.h
mps2-scc.h
msf2-sysreg.h
nrf51_rng.h Clean up decorations and whitespace around header guards 2019-05-13 08:58:55 +02:00
pca9552_regs.h
pca9552.h
pvpanic.h include: Make headers more self-contained 2019-08-16 13:31:51 +02:00
stm32f2xx_syscfg.h Include hw/hw.h exactly where needed 2019-08-16 13:31:52 +02:00
stm32f4xx_exti.h hw/misc: Add the STM32F4xx EXTI device 2020-01-17 14:09:29 +00:00
stm32f4xx_syscfg.h hw/misc: Add the STM32F4xx Sysconfig device 2020-01-17 14:09:29 +00:00
tmp105_regs.h
tz-mpc.h
tz-msc.h
tz-ppc.h
unimp.h sysbus: Convert to sysbus_realize() etc. with Coccinelle 2020-06-15 22:05:28 +02:00
vmcoreinfo.h Include hw/qdev-properties.h less 2019-08-16 13:31:53 +02:00
zynq-xadc.h