mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-12-11 16:00:50 -07:00
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]
|
||
|---|---|---|
| .. | ||
| bcm2835_aux.c | ||
| cadence_uart.c | ||
| cmsdk-apb-uart.c | ||
| debugcon.c | ||
| digic-uart.c | ||
| escc.c | ||
| etraxfs_ser.c | ||
| exynos4210_uart.c | ||
| grlib_apbuart.c | ||
| imx_serial.c | ||
| ipoctal232.c | ||
| Kconfig | ||
| lm32_juart.c | ||
| lm32_uart.c | ||
| Makefile.objs | ||
| mcf_uart.c | ||
| milkymist-uart.c | ||
| nrf51_uart.c | ||
| omap_uart.c | ||
| parallel-isa.c | ||
| parallel.c | ||
| pl011.c | ||
| sclpconsole-lm.c | ||
| sclpconsole.c | ||
| serial-isa.c | ||
| serial-pci-multi.c | ||
| serial-pci.c | ||
| serial.c | ||
| sh_serial.c | ||
| spapr_vty.c | ||
| stm32f2xx_usart.c | ||
| terminal3270.c | ||
| trace-events | ||
| virtio-console.c | ||
| virtio-serial-bus.c | ||
| xen_console.c | ||
| xilinx_uartlite.c | ||