qemu/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 hw/misc/armsse-cpuid: Implement SSE-200 CPU_IDENTITY register block 2019-02-01 14:55:43 +00:00
armsse-mhu.h Clean up header guards that don't match their file name 2019-05-13 08:58:55 +02:00
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 i.MX6UL: Add i.MX6UL specific CCM device 2018-08-16 14:05:28 +01:00
imx7_ccm.h i.MX: Add code to emulate i.MX7 CCM, PMU and ANALOG IP blocks 2018-02-09 10:40:29 +00:00
imx7_gpr.h i.MX: Add implementation of i.MX7 GPR IP block 2018-02-09 10:40:30 +00:00
imx7_snvs.h i.MX: Add code to emulate i.MX7 SNVS IP-block 2018-02-09 10:40:30 +00:00
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 hw/misc/iotkit-secctl: Support 4 internal MPCs 2019-02-01 14:55:42 +00:00
iotkit-sysctl.h hw/arm/armsse: Unify init-svtor and cpuwait handling 2019-02-28 11:03:04 +00:00
iotkit-sysinfo.h iotkit-sysinfo: Make SYS_VERSION and SYS_CONFIG configurable 2019-02-01 14:55:42 +00:00
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 target/mips: Update ITU to utilize SAARI and SAAR CP0 registers 2019-01-18 16:53:28 +01:00
mos6522.h mos6522: remove anh register 2020-01-08 11:01:59 +11:00
mps2-fpgaio.h hw/misc/mps2-fpgaio: Implement PSCNTR and COUNTER 2018-08-24 13:17:40 +01:00
mps2-scc.h hw/misc/mps2_scc: Implement MPS2 Serial Communication Controller 2017-07-17 13:36:08 +01:00
msf2-sysreg.h msf2: Microsemi Smartfusion2 System Register block 2017-09-21 16:36:56 +01:00
nrf51_rng.h Clean up decorations and whitespace around header guards 2019-05-13 08:58:55 +02:00
pca9552_regs.h misc: add pca9552 LED blinker model 2018-06-08 13:15:32 +01:00
pca9552.h misc: add pca9552 LED blinker model 2018-06-08 13:15:32 +01:00
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 hw/misc/tz-mpc.c: Implement registers 2018-06-22 13:28:39 +01:00
tz-msc.h hw/misc/tz-msc: Model TrustZone Master Security Controller 2018-08-24 13:17:43 +01:00
tz-ppc.h hw/misc/tz-ppc: Support having unused ports in the middle of the range 2019-02-21 18:17:46 +00:00
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