From f664b88247487c4cb020d016bef0f3b1daf9f4e5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= Date: Thu, 2 Feb 2017 17:47:00 +0400 Subject: Remove/replace sysemu/char.h inclusion MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Those are apparently unnecessary includes. Signed-off-by: Marc-André Lureau Reviewed-by: Philippe Mathieu-Daudé --- hw/arm/bcm2835_peripherals.c | 1 - hw/char/imx_serial.c | 1 - hw/display/xenfb.c | 1 - hw/i386/xen/xen-hvm.c | 1 - hw/mips/mips_fulong2e.c | 1 - hw/mips/mips_malta.c | 1 - hw/net/xgmac.c | 1 - hw/ppc/spapr_events.c | 1 - hw/ppc/spapr_rtas.c | 1 - hw/sparc/leon3.c | 1 - hw/usb/ccid-card-emulated.c | 2 +- hw/xen/xen_backend.c | 1 - 12 files changed, 1 insertion(+), 12 deletions(-) (limited to 'hw') diff --git a/hw/arm/bcm2835_peripherals.c b/hw/arm/bcm2835_peripherals.c index 369ef1e3bd..502f04c02a 100644 --- a/hw/arm/bcm2835_peripherals.c +++ b/hw/arm/bcm2835_peripherals.c @@ -13,7 +13,6 @@ #include "hw/arm/bcm2835_peripherals.h" #include "hw/misc/bcm2835_mbox_defs.h" #include "hw/arm/raspi_platform.h" -#include "sysemu/char.h" #include "sysemu/sysemu.h" /* Peripheral base address on the VC (GPU) system bus */ diff --git a/hw/char/imx_serial.c b/hw/char/imx_serial.c index 52e67f8dc9..af250305be 100644 --- a/hw/char/imx_serial.c +++ b/hw/char/imx_serial.c @@ -21,7 +21,6 @@ #include "qemu/osdep.h" #include "hw/char/imx_serial.h" #include "sysemu/sysemu.h" -#include "sysemu/char.h" #include "qemu/log.h" #ifndef DEBUG_IMX_UART diff --git a/hw/display/xenfb.c b/hw/display/xenfb.c index 7a8727aa21..e76c0d805c 100644 --- a/hw/display/xenfb.c +++ b/hw/display/xenfb.c @@ -28,7 +28,6 @@ #include "hw/hw.h" #include "ui/console.h" -#include "sysemu/char.h" #include "hw/xen/xen_backend.h" #include diff --git a/hw/i386/xen/xen-hvm.c b/hw/i386/xen/xen-hvm.c index 919f09b694..1acd4de405 100644 --- a/hw/i386/xen/xen-hvm.c +++ b/hw/i386/xen/xen-hvm.c @@ -18,7 +18,6 @@ #include "hw/xen/xen_backend.h" #include "qmp-commands.h" -#include "sysemu/char.h" #include "qemu/error-report.h" #include "qemu/range.h" #include "sysemu/xen-mapcache.h" diff --git a/hw/mips/mips_fulong2e.c b/hw/mips/mips_fulong2e.c index e636c3abaa..dbe2805acb 100644 --- a/hw/mips/mips_fulong2e.c +++ b/hw/mips/mips_fulong2e.c @@ -32,7 +32,6 @@ #include "hw/mips/mips.h" #include "hw/mips/cpudevs.h" #include "hw/pci/pci.h" -#include "sysemu/char.h" #include "sysemu/sysemu.h" #include "audio/audio.h" #include "qemu/log.h" diff --git a/hw/mips/mips_malta.c b/hw/mips/mips_malta.c index 7814c39654..95cdabb2dd 100644 --- a/hw/mips/mips_malta.c +++ b/hw/mips/mips_malta.c @@ -37,7 +37,6 @@ #include "hw/mips/mips.h" #include "hw/mips/cpudevs.h" #include "hw/pci/pci.h" -#include "sysemu/char.h" #include "sysemu/sysemu.h" #include "sysemu/arch_init.h" #include "qemu/log.h" diff --git a/hw/net/xgmac.c b/hw/net/xgmac.c index 46b1aa17fa..0843bf185c 100644 --- a/hw/net/xgmac.c +++ b/hw/net/xgmac.c @@ -26,7 +26,6 @@ #include "qemu/osdep.h" #include "hw/sysbus.h" -#include "sysemu/char.h" #include "qemu/log.h" #include "net/net.h" #include "net/checksum.h" diff --git a/hw/ppc/spapr_events.c b/hw/ppc/spapr_events.c index 73e2a1884f..57acd85a87 100644 --- a/hw/ppc/spapr_events.c +++ b/hw/ppc/spapr_events.c @@ -28,7 +28,6 @@ #include "qapi/error.h" #include "cpu.h" #include "sysemu/sysemu.h" -#include "sysemu/char.h" #include "hw/qdev.h" #include "sysemu/device_tree.h" diff --git a/hw/ppc/spapr_rtas.c b/hw/ppc/spapr_rtas.c index 128d993d04..b666a4c15c 100644 --- a/hw/ppc/spapr_rtas.c +++ b/hw/ppc/spapr_rtas.c @@ -29,7 +29,6 @@ #include "qemu/log.h" #include "qemu/error-report.h" #include "sysemu/sysemu.h" -#include "sysemu/char.h" #include "hw/qdev.h" #include "sysemu/device_tree.h" #include "sysemu/cpus.h" diff --git a/hw/sparc/leon3.c b/hw/sparc/leon3.c index 6e16478413..f415997649 100644 --- a/hw/sparc/leon3.c +++ b/hw/sparc/leon3.c @@ -28,7 +28,6 @@ #include "hw/hw.h" #include "qemu/timer.h" #include "hw/ptimer.h" -#include "sysemu/char.h" #include "sysemu/sysemu.h" #include "sysemu/qtest.h" #include "hw/boards.h" diff --git a/hw/usb/ccid-card-emulated.c b/hw/usb/ccid-card-emulated.c index 99627860a3..e646eb243b 100644 --- a/hw/usb/ccid-card-emulated.c +++ b/hw/usb/ccid-card-emulated.c @@ -33,7 +33,7 @@ #include #include "qemu/thread.h" -#include "sysemu/char.h" +#include "qemu/main-loop.h" #include "ccid.h" #define DPRINTF(card, lvl, fmt, ...) \ diff --git a/hw/xen/xen_backend.c b/hw/xen/xen_backend.c index 3570f37e56..c46cbb0759 100644 --- a/hw/xen/xen_backend.c +++ b/hw/xen/xen_backend.c @@ -28,7 +28,6 @@ #include "hw/hw.h" #include "hw/sysbus.h" #include "hw/boards.h" -#include "sysemu/char.h" #include "qemu/log.h" #include "qapi/error.h" #include "hw/xen/xen_backend.h" -- cgit v1.2.3 From 8228e353d8906bf43399ca0ef28446c5c48bb686 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= Date: Thu, 26 Jan 2017 17:19:46 +0400 Subject: chardev: move headers to include/chardev MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit So they are all in one place. The following patch will move serial & parallel declarations to the respective headers. Signed-off-by: Marc-André Lureau Reviewed-by: Philippe Mathieu-Daudé --- hw/arm/fsl-imx25.c | 2 +- hw/arm/fsl-imx31.c | 2 +- hw/arm/fsl-imx6.c | 2 +- hw/arm/omap2.c | 2 +- hw/arm/pxa2xx.c | 2 +- hw/arm/strongarm.c | 2 +- hw/bt/hci-csr.c | 2 +- hw/char/cadence_uart.c | 2 +- hw/char/debugcon.c | 2 +- hw/char/digic-uart.c | 2 +- hw/char/escc.c | 2 +- hw/char/etraxfs_ser.c | 2 +- hw/char/exynos4210_uart.c | 2 +- hw/char/grlib_apbuart.c | 2 +- hw/char/ipoctal232.c | 2 +- hw/char/lm32_juart.c | 2 +- hw/char/lm32_uart.c | 2 +- hw/char/mcf_uart.c | 2 +- hw/char/milkymist-uart.c | 2 +- hw/char/omap_uart.c | 2 +- hw/char/parallel.c | 2 +- hw/char/pl011.c | 2 +- hw/char/sclpconsole-lm.c | 2 +- hw/char/sclpconsole.c | 2 +- hw/char/serial.c | 2 +- hw/char/sh_serial.c | 2 +- hw/char/spapr_vty.c | 2 +- hw/char/terminal3270.c | 2 +- hw/char/virtio-console.c | 2 +- hw/char/xen_console.c | 2 +- hw/char/xilinx_uartlite.c | 2 +- hw/core/qdev-properties-system.c | 2 +- hw/core/qdev-properties.c | 2 +- hw/ipmi/ipmi_bmc_extern.c | 2 +- hw/isa/pc87312.c | 2 +- hw/mips/boston.c | 2 +- hw/misc/ivshmem.c | 2 +- hw/usb/ccid-card-passthru.c | 2 +- hw/usb/dev-serial.c | 2 +- hw/usb/redirect.c | 2 +- hw/virtio/vhost-user.c | 2 +- hw/xen/xen-common.c | 2 +- hw/xtensa/xtfpga.c | 2 +- 43 files changed, 43 insertions(+), 43 deletions(-) (limited to 'hw') diff --git a/hw/arm/fsl-imx25.c b/hw/arm/fsl-imx25.c index 9056f27bf8..40666b68a3 100644 --- a/hw/arm/fsl-imx25.c +++ b/hw/arm/fsl-imx25.c @@ -30,7 +30,7 @@ #include "sysemu/sysemu.h" #include "exec/address-spaces.h" #include "hw/boards.h" -#include "sysemu/char.h" +#include "chardev/char.h" static void fsl_imx25_init(Object *obj) { diff --git a/hw/arm/fsl-imx31.c b/hw/arm/fsl-imx31.c index d7e2d832b2..c30130667e 100644 --- a/hw/arm/fsl-imx31.c +++ b/hw/arm/fsl-imx31.c @@ -27,7 +27,7 @@ #include "sysemu/sysemu.h" #include "exec/address-spaces.h" #include "hw/boards.h" -#include "sysemu/char.h" +#include "chardev/char.h" static void fsl_imx31_init(Object *obj) { diff --git a/hw/arm/fsl-imx6.c b/hw/arm/fsl-imx6.c index 6969e734ad..27773c9c47 100644 --- a/hw/arm/fsl-imx6.c +++ b/hw/arm/fsl-imx6.c @@ -24,7 +24,7 @@ #include "qemu-common.h" #include "hw/arm/fsl-imx6.h" #include "sysemu/sysemu.h" -#include "sysemu/char.h" +#include "chardev/char.h" #include "qemu/error-report.h" #define NAME_SIZE 20 diff --git a/hw/arm/omap2.c b/hw/arm/omap2.c index 8afb854c74..9eabbaeea5 100644 --- a/hw/arm/omap2.c +++ b/hw/arm/omap2.c @@ -30,7 +30,7 @@ #include "hw/arm/omap.h" #include "sysemu/sysemu.h" #include "qemu/timer.h" -#include "sysemu/char.h" +#include "chardev/char.h" #include "hw/block/flash.h" #include "hw/arm/soc_dma.h" #include "hw/sysbus.h" diff --git a/hw/arm/pxa2xx.c b/hw/arm/pxa2xx.c index eea551dc16..0d43cc707c 100644 --- a/hw/arm/pxa2xx.c +++ b/hw/arm/pxa2xx.c @@ -17,7 +17,7 @@ #include "hw/char/serial.h" #include "hw/i2c/i2c.h" #include "hw/ssi/ssi.h" -#include "sysemu/char.h" +#include "chardev/char.h" #include "sysemu/block-backend.h" #include "sysemu/blockdev.h" #include "qemu/cutils.h" diff --git a/hw/arm/strongarm.c b/hw/arm/strongarm.c index 3311cc38a4..66cad198d4 100644 --- a/hw/arm/strongarm.c +++ b/hw/arm/strongarm.c @@ -34,7 +34,7 @@ #include "strongarm.h" #include "qemu/error-report.h" #include "hw/arm/arm.h" -#include "sysemu/char.h" +#include "chardev/char.h" #include "sysemu/sysemu.h" #include "hw/ssi/ssi.h" #include "qemu/cutils.h" diff --git a/hw/bt/hci-csr.c b/hw/bt/hci-csr.c index 3c193848fc..cc2087392e 100644 --- a/hw/bt/hci-csr.c +++ b/hw/bt/hci-csr.c @@ -20,7 +20,7 @@ #include "qemu/osdep.h" #include "qemu-common.h" -#include "sysemu/char.h" +#include "chardev/char.h" #include "qemu/timer.h" #include "qemu/bswap.h" #include "hw/irq.h" diff --git a/hw/char/cadence_uart.c b/hw/char/cadence_uart.c index 4dcee571c0..cf4c1d56ff 100644 --- a/hw/char/cadence_uart.c +++ b/hw/char/cadence_uart.c @@ -23,7 +23,7 @@ #include "qemu/osdep.h" #include "hw/sysbus.h" -#include "sysemu/char.h" +#include "chardev/char.h" #include "qemu/timer.h" #include "qemu/log.h" #include "hw/char/cadence_uart.h" diff --git a/hw/char/debugcon.c b/hw/char/debugcon.c index 80dce07e7f..77d91c8558 100644 --- a/hw/char/debugcon.c +++ b/hw/char/debugcon.c @@ -27,7 +27,7 @@ #include "qemu/osdep.h" #include "qapi/error.h" #include "hw/hw.h" -#include "sysemu/char.h" +#include "chardev/char.h" #include "hw/isa/isa.h" #include "hw/i386/pc.h" diff --git a/hw/char/digic-uart.c b/hw/char/digic-uart.c index 029f5bbf5e..4f1dec7f1d 100644 --- a/hw/char/digic-uart.c +++ b/hw/char/digic-uart.c @@ -29,7 +29,7 @@ #include "qemu/osdep.h" #include "hw/hw.h" #include "hw/sysbus.h" -#include "sysemu/char.h" +#include "chardev/char.h" #include "qemu/log.h" #include "hw/char/digic-uart.h" diff --git a/hw/char/escc.c b/hw/char/escc.c index 9228091cec..df89d58eed 100644 --- a/hw/char/escc.c +++ b/hw/char/escc.c @@ -26,7 +26,7 @@ #include "hw/hw.h" #include "hw/sysbus.h" #include "hw/char/escc.h" -#include "sysemu/char.h" +#include "chardev/char.h" #include "ui/console.h" #include "ui/input.h" #include "trace.h" diff --git a/hw/char/etraxfs_ser.c b/hw/char/etraxfs_ser.c index 54383878e0..33e3e16397 100644 --- a/hw/char/etraxfs_ser.c +++ b/hw/char/etraxfs_ser.c @@ -24,7 +24,7 @@ #include "qemu/osdep.h" #include "hw/sysbus.h" -#include "sysemu/char.h" +#include "chardev/char.h" #include "qemu/log.h" #define D(x) diff --git a/hw/char/exynos4210_uart.c b/hw/char/exynos4210_uart.c index bff706ab3a..94952fb90f 100644 --- a/hw/char/exynos4210_uart.c +++ b/hw/char/exynos4210_uart.c @@ -23,7 +23,7 @@ #include "hw/sysbus.h" #include "qemu/error-report.h" #include "sysemu/sysemu.h" -#include "sysemu/char.h" +#include "chardev/char.h" #include "hw/arm/exynos4210.h" diff --git a/hw/char/grlib_apbuart.c b/hw/char/grlib_apbuart.c index db686e6a6f..39d1133c61 100644 --- a/hw/char/grlib_apbuart.c +++ b/hw/char/grlib_apbuart.c @@ -24,7 +24,7 @@ #include "qemu/osdep.h" #include "hw/sysbus.h" -#include "sysemu/char.h" +#include "chardev/char.h" #include "trace.h" diff --git a/hw/char/ipoctal232.c b/hw/char/ipoctal232.c index 93929c2880..b8a3c92c9e 100644 --- a/hw/char/ipoctal232.c +++ b/hw/char/ipoctal232.c @@ -11,7 +11,7 @@ #include "qemu/osdep.h" #include "hw/ipack/ipack.h" #include "qemu/bitops.h" -#include "sysemu/char.h" +#include "chardev/char.h" /* #define DEBUG_IPOCTAL */ diff --git a/hw/char/lm32_juart.c b/hw/char/lm32_juart.c index f8c1e0d076..6b0633e518 100644 --- a/hw/char/lm32_juart.c +++ b/hw/char/lm32_juart.c @@ -21,7 +21,7 @@ #include "hw/hw.h" #include "hw/sysbus.h" #include "trace.h" -#include "sysemu/char.h" +#include "chardev/char.h" #include "hw/char/lm32_juart.h" diff --git a/hw/char/lm32_uart.c b/hw/char/lm32_uart.c index 7f3597c4b0..a7610c28ce 100644 --- a/hw/char/lm32_uart.c +++ b/hw/char/lm32_uart.c @@ -26,7 +26,7 @@ #include "hw/hw.h" #include "hw/sysbus.h" #include "trace.h" -#include "sysemu/char.h" +#include "chardev/char.h" #include "qemu/error-report.h" enum { diff --git a/hw/char/mcf_uart.c b/hw/char/mcf_uart.c index e69672f4e9..b639b53c83 100644 --- a/hw/char/mcf_uart.c +++ b/hw/char/mcf_uart.c @@ -9,7 +9,7 @@ #include "hw/hw.h" #include "hw/sysbus.h" #include "hw/m68k/mcf.h" -#include "sysemu/char.h" +#include "chardev/char.h" #include "exec/address-spaces.h" #include "qapi/error.h" diff --git a/hw/char/milkymist-uart.c b/hw/char/milkymist-uart.c index ae8e2f3554..5ef847c5eb 100644 --- a/hw/char/milkymist-uart.c +++ b/hw/char/milkymist-uart.c @@ -25,7 +25,7 @@ #include "hw/hw.h" #include "hw/sysbus.h" #include "trace.h" -#include "sysemu/char.h" +#include "chardev/char.h" #include "qemu/error-report.h" enum { diff --git a/hw/char/omap_uart.c b/hw/char/omap_uart.c index 31ebb1592c..6fd1b9cf6b 100644 --- a/hw/char/omap_uart.c +++ b/hw/char/omap_uart.c @@ -18,7 +18,7 @@ * with this program; if not, see . */ #include "qemu/osdep.h" -#include "sysemu/char.h" +#include "chardev/char.h" #include "hw/hw.h" #include "hw/arm/omap.h" #include "hw/char/serial.h" diff --git a/hw/char/parallel.c b/hw/char/parallel.c index c71a4a0f4f..c926df0bee 100644 --- a/hw/char/parallel.c +++ b/hw/char/parallel.c @@ -25,7 +25,7 @@ #include "qemu/osdep.h" #include "qapi/error.h" #include "hw/hw.h" -#include "sysemu/char.h" +#include "chardev/char.h" #include "hw/isa/isa.h" #include "hw/i386/pc.h" #include "sysemu/sysemu.h" diff --git a/hw/char/pl011.c b/hw/char/pl011.c index 24ea9738b6..1757035bb3 100644 --- a/hw/char/pl011.c +++ b/hw/char/pl011.c @@ -9,7 +9,7 @@ #include "qemu/osdep.h" #include "hw/sysbus.h" -#include "sysemu/char.h" +#include "chardev/char.h" #include "qemu/log.h" #include "trace.h" diff --git a/hw/char/sclpconsole-lm.c b/hw/char/sclpconsole-lm.c index 07d6ebd112..755d514188 100644 --- a/hw/char/sclpconsole-lm.c +++ b/hw/char/sclpconsole-lm.c @@ -17,7 +17,7 @@ #include "hw/qdev.h" #include "qemu/thread.h" #include "qemu/error-report.h" -#include "sysemu/char.h" +#include "chardev/char.h" #include "hw/s390x/sclp.h" #include "hw/s390x/event-facility.h" diff --git a/hw/char/sclpconsole.c b/hw/char/sclpconsole.c index b78f240a73..0fd3cb4887 100644 --- a/hw/char/sclpconsole.c +++ b/hw/char/sclpconsole.c @@ -19,7 +19,7 @@ #include "hw/s390x/sclp.h" #include "hw/s390x/event-facility.h" -#include "sysemu/char.h" +#include "chardev/char.h" typedef struct ASCIIConsoleData { EventBufferHeader ebh; diff --git a/hw/char/serial.c b/hw/char/serial.c index 03d890ca24..aa336333be 100644 --- a/hw/char/serial.c +++ b/hw/char/serial.c @@ -25,7 +25,7 @@ #include "qemu/osdep.h" #include "hw/char/serial.h" -#include "sysemu/char.h" +#include "chardev/char.h" #include "qapi/error.h" #include "qemu/timer.h" #include "exec/address-spaces.h" diff --git a/hw/char/sh_serial.c b/hw/char/sh_serial.c index 303eb0a678..80c7696d8d 100644 --- a/hw/char/sh_serial.c +++ b/hw/char/sh_serial.c @@ -27,7 +27,7 @@ #include "qemu/osdep.h" #include "hw/hw.h" #include "hw/sh4/sh.h" -#include "sysemu/char.h" +#include "chardev/char.h" #include "exec/address-spaces.h" #include "qapi/error.h" diff --git a/hw/char/spapr_vty.c b/hw/char/spapr_vty.c index e30c8da57c..2317e45404 100644 --- a/hw/char/spapr_vty.c +++ b/hw/char/spapr_vty.c @@ -4,7 +4,7 @@ #include "qemu-common.h" #include "cpu.h" #include "hw/qdev.h" -#include "sysemu/char.h" +#include "chardev/char.h" #include "hw/ppc/spapr.h" #include "hw/ppc/spapr_vio.h" diff --git a/hw/char/terminal3270.c b/hw/char/terminal3270.c index b2dda01baa..c043104185 100644 --- a/hw/char/terminal3270.c +++ b/hw/char/terminal3270.c @@ -13,7 +13,7 @@ #include "qemu/osdep.h" #include "qapi/error.h" -#include "sysemu/char.h" +#include "chardev/char.h" #include "hw/s390x/3270-ccw.h" /* Enough spaces for different window sizes. */ diff --git a/hw/char/virtio-console.c b/hw/char/virtio-console.c index 798d9b69fd..8418db6a07 100644 --- a/hw/char/virtio-console.c +++ b/hw/char/virtio-console.c @@ -11,7 +11,7 @@ */ #include "qemu/osdep.h" -#include "sysemu/char.h" +#include "chardev/char.h" #include "qemu/error-report.h" #include "trace.h" #include "hw/virtio/virtio-serial.h" diff --git a/hw/char/xen_console.c b/hw/char/xen_console.c index c01f41090e..1cdbe59f8a 100644 --- a/hw/char/xen_console.c +++ b/hw/char/xen_console.c @@ -25,7 +25,7 @@ #include "qapi/error.h" #include "hw/hw.h" -#include "sysemu/char.h" +#include "chardev/char.h" #include "hw/xen/xen_backend.h" #include "qapi/error.h" diff --git a/hw/char/xilinx_uartlite.c b/hw/char/xilinx_uartlite.c index 37d313b429..bcebdae3da 100644 --- a/hw/char/xilinx_uartlite.c +++ b/hw/char/xilinx_uartlite.c @@ -24,7 +24,7 @@ #include "qemu/osdep.h" #include "hw/sysbus.h" -#include "sysemu/char.h" +#include "chardev/char.h" #define DUART(x) diff --git a/hw/core/qdev-properties-system.c b/hw/core/qdev-properties-system.c index 79c2014135..4da0c6a24e 100644 --- a/hw/core/qdev-properties-system.c +++ b/hw/core/qdev-properties-system.c @@ -20,7 +20,7 @@ #include "hw/block/block.h" #include "net/hub.h" #include "qapi/visitor.h" -#include "sysemu/char.h" +#include "chardev/char.h" #include "sysemu/iothread.h" static void get_pointer(Object *obj, Visitor *v, Property *prop, diff --git a/hw/core/qdev-properties.c b/hw/core/qdev-properties.c index fa3617db2d..9f1a497322 100644 --- a/hw/core/qdev-properties.c +++ b/hw/core/qdev-properties.c @@ -9,7 +9,7 @@ #include "hw/block/block.h" #include "net/hub.h" #include "qapi/visitor.h" -#include "sysemu/char.h" +#include "chardev/char.h" void qdev_prop_set_after_realize(DeviceState *dev, const char *name, Error **errp) diff --git a/hw/ipmi/ipmi_bmc_extern.c b/hw/ipmi/ipmi_bmc_extern.c index e8e3d250b6..35285383fd 100644 --- a/hw/ipmi/ipmi_bmc_extern.c +++ b/hw/ipmi/ipmi_bmc_extern.c @@ -30,7 +30,7 @@ #include "qemu/osdep.h" #include "qapi/error.h" #include "qemu/timer.h" -#include "sysemu/char.h" +#include "chardev/char.h" #include "sysemu/sysemu.h" #include "hw/ipmi/ipmi.h" diff --git a/hw/isa/pc87312.c b/hw/isa/pc87312.c index c707d24db4..5ce9f0a062 100644 --- a/hw/isa/pc87312.c +++ b/hw/isa/pc87312.c @@ -30,7 +30,7 @@ #include "sysemu/block-backend.h" #include "sysemu/blockdev.h" #include "sysemu/sysemu.h" -#include "sysemu/char.h" +#include "chardev/char.h" #include "trace.h" diff --git a/hw/mips/boston.c b/hw/mips/boston.c index 53d1e0ce45..a4677f7da4 100644 --- a/hw/mips/boston.c +++ b/hw/mips/boston.c @@ -35,7 +35,7 @@ #include "qemu/cutils.h" #include "qemu/error-report.h" #include "qemu/log.h" -#include "sysemu/char.h" +#include "chardev/char.h" #include "sysemu/device_tree.h" #include "sysemu/sysemu.h" #include "sysemu/qtest.h" diff --git a/hw/misc/ivshmem.c b/hw/misc/ivshmem.c index 475e36a4c7..cd064dcf8c 100644 --- a/hw/misc/ivshmem.c +++ b/hw/misc/ivshmem.c @@ -29,7 +29,7 @@ #include "qemu/error-report.h" #include "qemu/event_notifier.h" #include "qom/object_interfaces.h" -#include "sysemu/char.h" +#include "chardev/char.h" #include "sysemu/hostmem.h" #include "sysemu/qtest.h" #include "qapi/visitor.h" diff --git a/hw/usb/ccid-card-passthru.c b/hw/usb/ccid-card-passthru.c index a41b0d6ec5..c2096b25ab 100644 --- a/hw/usb/ccid-card-passthru.c +++ b/hw/usb/ccid-card-passthru.c @@ -9,7 +9,7 @@ */ #include "qemu/osdep.h" -#include "sysemu/char.h" +#include "chardev/char.h" #include "qemu/error-report.h" #include "qemu/sockets.h" #include "ccid.h" diff --git a/hw/usb/dev-serial.c b/hw/usb/dev-serial.c index 76ceca1f5c..4df995109b 100644 --- a/hw/usb/dev-serial.c +++ b/hw/usb/dev-serial.c @@ -15,7 +15,7 @@ #include "qemu/error-report.h" #include "hw/usb.h" #include "hw/usb/desc.h" -#include "sysemu/char.h" +#include "chardev/char.h" //#define DEBUG_Serial diff --git a/hw/usb/redirect.c b/hw/usb/redirect.c index ad5ef783a6..c862c1adea 100644 --- a/hw/usb/redirect.c +++ b/hw/usb/redirect.c @@ -33,7 +33,7 @@ #include "qapi/qmp/qerror.h" #include "qemu/error-report.h" #include "qemu/iov.h" -#include "sysemu/char.h" +#include "chardev/char.h" #include #include diff --git a/hw/virtio/vhost-user.c b/hw/virtio/vhost-user.c index dde094abb4..44c9d8c954 100644 --- a/hw/virtio/vhost-user.c +++ b/hw/virtio/vhost-user.c @@ -13,7 +13,7 @@ #include "hw/virtio/vhost.h" #include "hw/virtio/vhost-backend.h" #include "hw/virtio/virtio-net.h" -#include "sysemu/char.h" +#include "chardev/char.h" #include "sysemu/kvm.h" #include "qemu/error-report.h" #include "qemu/sockets.h" diff --git a/hw/xen/xen-common.c b/hw/xen/xen-common.c index a9055e9eba..0bed5770c9 100644 --- a/hw/xen/xen-common.c +++ b/hw/xen/xen-common.c @@ -11,7 +11,7 @@ #include "qemu/osdep.h" #include "hw/xen/xen_backend.h" #include "qmp-commands.h" -#include "sysemu/char.h" +#include "chardev/char.h" #include "sysemu/accel.h" #include "migration/migration.h" diff --git a/hw/xtensa/xtfpga.c b/hw/xtensa/xtfpga.c index 4636f8e934..d5ac080d4a 100644 --- a/hw/xtensa/xtfpga.c +++ b/hw/xtensa/xtfpga.c @@ -40,7 +40,7 @@ #include "hw/sysbus.h" #include "hw/block/flash.h" #include "sysemu/block-backend.h" -#include "sysemu/char.h" +#include "chardev/char.h" #include "sysemu/device_tree.h" #include "qemu/error-report.h" #include "bootparam.h" -- cgit v1.2.3 From 7566c6efe75572c63a8841fc09d0a8935b188c2f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= Date: Thu, 26 Jan 2017 17:33:39 +0400 Subject: chardev: serial & parallel declaration to own headers MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Marc-André Lureau Reviewed-by: Philippe Mathieu-Daudé --- hw/arm/strongarm.c | 2 +- hw/bt/hci-csr.c | 2 +- hw/char/cadence_uart.c | 2 +- hw/char/escc.c | 2 +- hw/char/exynos4210_uart.c | 2 +- hw/char/parallel.c | 2 +- hw/char/serial.c | 2 +- hw/usb/dev-serial.c | 2 +- 8 files changed, 8 insertions(+), 8 deletions(-) (limited to 'hw') diff --git a/hw/arm/strongarm.c b/hw/arm/strongarm.c index 66cad198d4..967caea749 100644 --- a/hw/arm/strongarm.c +++ b/hw/arm/strongarm.c @@ -34,7 +34,7 @@ #include "strongarm.h" #include "qemu/error-report.h" #include "hw/arm/arm.h" -#include "chardev/char.h" +#include "chardev/char-serial.h" #include "sysemu/sysemu.h" #include "hw/ssi/ssi.h" #include "qemu/cutils.h" diff --git a/hw/bt/hci-csr.c b/hw/bt/hci-csr.c index cc2087392e..0f2021086d 100644 --- a/hw/bt/hci-csr.c +++ b/hw/bt/hci-csr.c @@ -20,7 +20,7 @@ #include "qemu/osdep.h" #include "qemu-common.h" -#include "chardev/char.h" +#include "chardev/char-serial.h" #include "qemu/timer.h" #include "qemu/bswap.h" #include "hw/irq.h" diff --git a/hw/char/cadence_uart.c b/hw/char/cadence_uart.c index cf4c1d56ff..4bfc185376 100644 --- a/hw/char/cadence_uart.c +++ b/hw/char/cadence_uart.c @@ -23,7 +23,7 @@ #include "qemu/osdep.h" #include "hw/sysbus.h" -#include "chardev/char.h" +#include "chardev/char-serial.h" #include "qemu/timer.h" #include "qemu/log.h" #include "hw/char/cadence_uart.h" diff --git a/hw/char/escc.c b/hw/char/escc.c index df89d58eed..81d792cb47 100644 --- a/hw/char/escc.c +++ b/hw/char/escc.c @@ -26,7 +26,7 @@ #include "hw/hw.h" #include "hw/sysbus.h" #include "hw/char/escc.h" -#include "chardev/char.h" +#include "chardev/char-serial.h" #include "ui/console.h" #include "ui/input.h" #include "trace.h" diff --git a/hw/char/exynos4210_uart.c b/hw/char/exynos4210_uart.c index 94952fb90f..d93125645a 100644 --- a/hw/char/exynos4210_uart.c +++ b/hw/char/exynos4210_uart.c @@ -23,7 +23,7 @@ #include "hw/sysbus.h" #include "qemu/error-report.h" #include "sysemu/sysemu.h" -#include "chardev/char.h" +#include "chardev/char-serial.h" #include "hw/arm/exynos4210.h" diff --git a/hw/char/parallel.c b/hw/char/parallel.c index c926df0bee..1d6c6e9f33 100644 --- a/hw/char/parallel.c +++ b/hw/char/parallel.c @@ -25,7 +25,7 @@ #include "qemu/osdep.h" #include "qapi/error.h" #include "hw/hw.h" -#include "chardev/char.h" +#include "chardev/char-parallel.h" #include "hw/isa/isa.h" #include "hw/i386/pc.h" #include "sysemu/sysemu.h" diff --git a/hw/char/serial.c b/hw/char/serial.c index aa336333be..23e5fe9d18 100644 --- a/hw/char/serial.c +++ b/hw/char/serial.c @@ -25,7 +25,7 @@ #include "qemu/osdep.h" #include "hw/char/serial.h" -#include "chardev/char.h" +#include "chardev/char-serial.h" #include "qapi/error.h" #include "qemu/timer.h" #include "exec/address-spaces.h" diff --git a/hw/usb/dev-serial.c b/hw/usb/dev-serial.c index 4df995109b..8baf040b5f 100644 --- a/hw/usb/dev-serial.c +++ b/hw/usb/dev-serial.c @@ -15,7 +15,7 @@ #include "qemu/error-report.h" #include "hw/usb.h" #include "hw/usb/desc.h" -#include "chardev/char.h" +#include "chardev/char-serial.h" //#define DEBUG_Serial -- cgit v1.2.3 From 93a78e41242ba164ae6af1690ea68fe22165ad4b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= Date: Thu, 26 Jan 2017 17:55:04 +0400 Subject: be-hci: use backend functions MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Avoid accessing CharBackend directly, use qemu_chr_be_* methods instead. be->chr_read should exists if qemu_chr_be_can_write() is true. (use qemu_chr_be_write(), _impl() bypasses replay) Signed-off-by: Marc-André Lureau Reviewed-by: Andrzej Zaborowski --- hw/bt/hci-csr.c | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) (limited to 'hw') diff --git a/hw/bt/hci-csr.c b/hw/bt/hci-csr.c index 0f2021086d..d13192b9b5 100644 --- a/hw/bt/hci-csr.c +++ b/hw/bt/hci-csr.c @@ -82,17 +82,14 @@ enum { static inline void csrhci_fifo_wake(struct csrhci_s *s) { - Chardev *chr = (Chardev *)s; - CharBackend *be = chr->be; + Chardev *chr = CHARDEV(s); if (!s->enable || !s->out_len) return; /* XXX: Should wait for s->modem_state & CHR_TIOCM_RTS? */ - if (be && be->chr_can_read && be->chr_can_read(be->opaque) && - be->chr_read) { - be->chr_read(be->opaque, - s->outfifo + s->out_start++, 1); + if (qemu_chr_be_can_write(chr)) { + qemu_chr_be_write(chr, s->outfifo + s->out_start++, 1); s->out_len--; if (s->out_start >= s->out_size) { s->out_start = 0; -- cgit v1.2.3 From 4d43a603c71d0eb92534bc82b72933f329d8a64c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= Date: Thu, 26 Jan 2017 18:26:44 +0400 Subject: char: move CharBackend handling in char-fe unit MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Move all the frontend struct and methods to a seperate unit. This avoids accidentally mixing backend and frontend calls, and helps with readabilty. Make qemu_chr_replay() a macro shared by both char and char-fe. Export qemu_chr_write(), and use a macro for qemu_chr_write_all() (nb: yes, CharBackend is for char frontend :) Signed-off-by: Marc-André Lureau Reviewed-by: Philippe Mathieu-Daudé --- hw/arm/omap2.c | 2 +- hw/arm/pxa2xx.c | 2 +- hw/arm/strongarm.c | 1 + hw/char/cadence_uart.c | 1 + hw/char/debugcon.c | 2 +- hw/char/digic-uart.c | 2 +- hw/char/escc.c | 1 + hw/char/etraxfs_ser.c | 2 +- hw/char/exynos4210_uart.c | 1 + hw/char/grlib_apbuart.c | 2 +- hw/char/ipoctal232.c | 2 +- hw/char/lm32_juart.c | 2 +- hw/char/lm32_uart.c | 2 +- hw/char/mcf_uart.c | 2 +- hw/char/milkymist-uart.c | 2 +- hw/char/parallel.c | 1 + hw/char/pl011.c | 2 +- hw/char/sclpconsole-lm.c | 2 +- hw/char/sclpconsole.c | 2 +- hw/char/sh_serial.c | 2 +- hw/char/spapr_vty.c | 2 +- hw/char/terminal3270.c | 2 +- hw/char/virtio-console.c | 2 +- hw/char/xen_console.c | 2 +- hw/char/xilinx_uartlite.c | 2 +- hw/core/qdev-properties-system.c | 2 +- hw/ipmi/ipmi_bmc_extern.c | 2 +- hw/misc/ivshmem.c | 2 +- hw/usb/ccid-card-passthru.c | 2 +- hw/usb/dev-serial.c | 1 + hw/usb/redirect.c | 2 +- hw/virtio/vhost-user.c | 2 +- 32 files changed, 32 insertions(+), 26 deletions(-) (limited to 'hw') diff --git a/hw/arm/omap2.c b/hw/arm/omap2.c index 9eabbaeea5..91f573338c 100644 --- a/hw/arm/omap2.c +++ b/hw/arm/omap2.c @@ -30,7 +30,7 @@ #include "hw/arm/omap.h" #include "sysemu/sysemu.h" #include "qemu/timer.h" -#include "chardev/char.h" +#include "chardev/char-fe.h" #include "hw/block/flash.h" #include "hw/arm/soc_dma.h" #include "hw/sysbus.h" diff --git a/hw/arm/pxa2xx.c b/hw/arm/pxa2xx.c index 0d43cc707c..629e6c64e6 100644 --- a/hw/arm/pxa2xx.c +++ b/hw/arm/pxa2xx.c @@ -17,7 +17,7 @@ #include "hw/char/serial.h" #include "hw/i2c/i2c.h" #include "hw/ssi/ssi.h" -#include "chardev/char.h" +#include "chardev/char-fe.h" #include "sysemu/block-backend.h" #include "sysemu/blockdev.h" #include "qemu/cutils.h" diff --git a/hw/arm/strongarm.c b/hw/arm/strongarm.c index 967caea749..7683edc9e5 100644 --- a/hw/arm/strongarm.c +++ b/hw/arm/strongarm.c @@ -34,6 +34,7 @@ #include "strongarm.h" #include "qemu/error-report.h" #include "hw/arm/arm.h" +#include "chardev/char-fe.h" #include "chardev/char-serial.h" #include "sysemu/sysemu.h" #include "hw/ssi/ssi.h" diff --git a/hw/char/cadence_uart.c b/hw/char/cadence_uart.c index 4bfc185376..4a2c124104 100644 --- a/hw/char/cadence_uart.c +++ b/hw/char/cadence_uart.c @@ -23,6 +23,7 @@ #include "qemu/osdep.h" #include "hw/sysbus.h" +#include "chardev/char-fe.h" #include "chardev/char-serial.h" #include "qemu/timer.h" #include "qemu/log.h" diff --git a/hw/char/debugcon.c b/hw/char/debugcon.c index 77d91c8558..762e3d8ada 100644 --- a/hw/char/debugcon.c +++ b/hw/char/debugcon.c @@ -27,7 +27,7 @@ #include "qemu/osdep.h" #include "qapi/error.h" #include "hw/hw.h" -#include "chardev/char.h" +#include "chardev/char-fe.h" #include "hw/isa/isa.h" #include "hw/i386/pc.h" diff --git a/hw/char/digic-uart.c b/hw/char/digic-uart.c index 4f1dec7f1d..34306e11ff 100644 --- a/hw/char/digic-uart.c +++ b/hw/char/digic-uart.c @@ -29,7 +29,7 @@ #include "qemu/osdep.h" #include "hw/hw.h" #include "hw/sysbus.h" -#include "chardev/char.h" +#include "chardev/char-fe.h" #include "qemu/log.h" #include "hw/char/digic-uart.h" diff --git a/hw/char/escc.c b/hw/char/escc.c index 81d792cb47..3f787632c7 100644 --- a/hw/char/escc.c +++ b/hw/char/escc.c @@ -26,6 +26,7 @@ #include "hw/hw.h" #include "hw/sysbus.h" #include "hw/char/escc.h" +#include "chardev/char-fe.h" #include "chardev/char-serial.h" #include "ui/console.h" #include "ui/input.h" diff --git a/hw/char/etraxfs_ser.c b/hw/char/etraxfs_ser.c index 33e3e16397..c1fba9f50f 100644 --- a/hw/char/etraxfs_ser.c +++ b/hw/char/etraxfs_ser.c @@ -24,7 +24,7 @@ #include "qemu/osdep.h" #include "hw/sysbus.h" -#include "chardev/char.h" +#include "chardev/char-fe.h" #include "qemu/log.h" #define D(x) diff --git a/hw/char/exynos4210_uart.c b/hw/char/exynos4210_uart.c index d93125645a..b51d44a321 100644 --- a/hw/char/exynos4210_uart.c +++ b/hw/char/exynos4210_uart.c @@ -23,6 +23,7 @@ #include "hw/sysbus.h" #include "qemu/error-report.h" #include "sysemu/sysemu.h" +#include "chardev/char-fe.h" #include "chardev/char-serial.h" #include "hw/arm/exynos4210.h" diff --git a/hw/char/grlib_apbuart.c b/hw/char/grlib_apbuart.c index 39d1133c61..32d98edf49 100644 --- a/hw/char/grlib_apbuart.c +++ b/hw/char/grlib_apbuart.c @@ -24,7 +24,7 @@ #include "qemu/osdep.h" #include "hw/sysbus.h" -#include "chardev/char.h" +#include "chardev/char-fe.h" #include "trace.h" diff --git a/hw/char/ipoctal232.c b/hw/char/ipoctal232.c index b8a3c92c9e..337a3e566a 100644 --- a/hw/char/ipoctal232.c +++ b/hw/char/ipoctal232.c @@ -11,7 +11,7 @@ #include "qemu/osdep.h" #include "hw/ipack/ipack.h" #include "qemu/bitops.h" -#include "chardev/char.h" +#include "chardev/char-fe.h" /* #define DEBUG_IPOCTAL */ diff --git a/hw/char/lm32_juart.c b/hw/char/lm32_juart.c index 6b0633e518..3948dcd332 100644 --- a/hw/char/lm32_juart.c +++ b/hw/char/lm32_juart.c @@ -21,7 +21,7 @@ #include "hw/hw.h" #include "hw/sysbus.h" #include "trace.h" -#include "chardev/char.h" +#include "chardev/char-fe.h" #include "hw/char/lm32_juart.h" diff --git a/hw/char/lm32_uart.c b/hw/char/lm32_uart.c index a7610c28ce..cff8c38f90 100644 --- a/hw/char/lm32_uart.c +++ b/hw/char/lm32_uart.c @@ -26,7 +26,7 @@ #include "hw/hw.h" #include "hw/sysbus.h" #include "trace.h" -#include "chardev/char.h" +#include "chardev/char-fe.h" #include "qemu/error-report.h" enum { diff --git a/hw/char/mcf_uart.c b/hw/char/mcf_uart.c index b639b53c83..fe12ad5ccb 100644 --- a/hw/char/mcf_uart.c +++ b/hw/char/mcf_uart.c @@ -9,7 +9,7 @@ #include "hw/hw.h" #include "hw/sysbus.h" #include "hw/m68k/mcf.h" -#include "chardev/char.h" +#include "chardev/char-fe.h" #include "exec/address-spaces.h" #include "qapi/error.h" diff --git a/hw/char/milkymist-uart.c b/hw/char/milkymist-uart.c index 5ef847c5eb..e19d0f6520 100644 --- a/hw/char/milkymist-uart.c +++ b/hw/char/milkymist-uart.c @@ -25,7 +25,7 @@ #include "hw/hw.h" #include "hw/sysbus.h" #include "trace.h" -#include "chardev/char.h" +#include "chardev/char-fe.h" #include "qemu/error-report.h" enum { diff --git a/hw/char/parallel.c b/hw/char/parallel.c index 1d6c6e9f33..75a1a2f55e 100644 --- a/hw/char/parallel.c +++ b/hw/char/parallel.c @@ -26,6 +26,7 @@ #include "qapi/error.h" #include "hw/hw.h" #include "chardev/char-parallel.h" +#include "chardev/char-fe.h" #include "hw/isa/isa.h" #include "hw/i386/pc.h" #include "sysemu/sysemu.h" diff --git a/hw/char/pl011.c b/hw/char/pl011.c index 1757035bb3..33802f00c8 100644 --- a/hw/char/pl011.c +++ b/hw/char/pl011.c @@ -9,7 +9,7 @@ #include "qemu/osdep.h" #include "hw/sysbus.h" -#include "chardev/char.h" +#include "chardev/char-fe.h" #include "qemu/log.h" #include "trace.h" diff --git a/hw/char/sclpconsole-lm.c b/hw/char/sclpconsole-lm.c index 755d514188..1b15046690 100644 --- a/hw/char/sclpconsole-lm.c +++ b/hw/char/sclpconsole-lm.c @@ -17,7 +17,7 @@ #include "hw/qdev.h" #include "qemu/thread.h" #include "qemu/error-report.h" -#include "chardev/char.h" +#include "chardev/char-fe.h" #include "hw/s390x/sclp.h" #include "hw/s390x/event-facility.h" diff --git a/hw/char/sclpconsole.c b/hw/char/sclpconsole.c index 0fd3cb4887..4a107a268d 100644 --- a/hw/char/sclpconsole.c +++ b/hw/char/sclpconsole.c @@ -19,7 +19,7 @@ #include "hw/s390x/sclp.h" #include "hw/s390x/event-facility.h" -#include "chardev/char.h" +#include "chardev/char-fe.h" typedef struct ASCIIConsoleData { EventBufferHeader ebh; diff --git a/hw/char/sh_serial.c b/hw/char/sh_serial.c index 80c7696d8d..ca9816d045 100644 --- a/hw/char/sh_serial.c +++ b/hw/char/sh_serial.c @@ -27,7 +27,7 @@ #include "qemu/osdep.h" #include "hw/hw.h" #include "hw/sh4/sh.h" -#include "chardev/char.h" +#include "chardev/char-fe.h" #include "exec/address-spaces.h" #include "qapi/error.h" diff --git a/hw/char/spapr_vty.c b/hw/char/spapr_vty.c index 2317e45404..8f02f3a612 100644 --- a/hw/char/spapr_vty.c +++ b/hw/char/spapr_vty.c @@ -4,7 +4,7 @@ #include "qemu-common.h" #include "cpu.h" #include "hw/qdev.h" -#include "chardev/char.h" +#include "chardev/char-fe.h" #include "hw/ppc/spapr.h" #include "hw/ppc/spapr_vio.h" diff --git a/hw/char/terminal3270.c b/hw/char/terminal3270.c index c043104185..7b10a04f18 100644 --- a/hw/char/terminal3270.c +++ b/hw/char/terminal3270.c @@ -13,7 +13,7 @@ #include "qemu/osdep.h" #include "qapi/error.h" -#include "chardev/char.h" +#include "chardev/char-fe.h" #include "hw/s390x/3270-ccw.h" /* Enough spaces for different window sizes. */ diff --git a/hw/char/virtio-console.c b/hw/char/virtio-console.c index 8418db6a07..0cb1668c8a 100644 --- a/hw/char/virtio-console.c +++ b/hw/char/virtio-console.c @@ -11,7 +11,7 @@ */ #include "qemu/osdep.h" -#include "chardev/char.h" +#include "chardev/char-fe.h" #include "qemu/error-report.h" #include "trace.h" #include "hw/virtio/virtio-serial.h" diff --git a/hw/char/xen_console.c b/hw/char/xen_console.c index 1cdbe59f8a..cb849c2e3e 100644 --- a/hw/char/xen_console.c +++ b/hw/char/xen_console.c @@ -25,7 +25,7 @@ #include "qapi/error.h" #include "hw/hw.h" -#include "chardev/char.h" +#include "chardev/char-fe.h" #include "hw/xen/xen_backend.h" #include "qapi/error.h" diff --git a/hw/char/xilinx_uartlite.c b/hw/char/xilinx_uartlite.c index bcebdae3da..71ed2fc1be 100644 --- a/hw/char/xilinx_uartlite.c +++ b/hw/char/xilinx_uartlite.c @@ -24,7 +24,7 @@ #include "qemu/osdep.h" #include "hw/sysbus.h" -#include "chardev/char.h" +#include "chardev/char-fe.h" #define DUART(x) diff --git a/hw/core/qdev-properties-system.c b/hw/core/qdev-properties-system.c index 4da0c6a24e..a549d39030 100644 --- a/hw/core/qdev-properties-system.c +++ b/hw/core/qdev-properties-system.c @@ -20,7 +20,7 @@ #include "hw/block/block.h" #include "net/hub.h" #include "qapi/visitor.h" -#include "chardev/char.h" +#include "chardev/char-fe.h" #include "sysemu/iothread.h" static void get_pointer(Object *obj, Visitor *v, Property *prop, diff --git a/hw/ipmi/ipmi_bmc_extern.c b/hw/ipmi/ipmi_bmc_extern.c index 35285383fd..329b03e17f 100644 --- a/hw/ipmi/ipmi_bmc_extern.c +++ b/hw/ipmi/ipmi_bmc_extern.c @@ -30,7 +30,7 @@ #include "qemu/osdep.h" #include "qapi/error.h" #include "qemu/timer.h" -#include "chardev/char.h" +#include "chardev/char-fe.h" #include "sysemu/sysemu.h" #include "hw/ipmi/ipmi.h" diff --git a/hw/misc/ivshmem.c b/hw/misc/ivshmem.c index cd064dcf8c..6367d041f0 100644 --- a/hw/misc/ivshmem.c +++ b/hw/misc/ivshmem.c @@ -29,7 +29,7 @@ #include "qemu/error-report.h" #include "qemu/event_notifier.h" #include "qom/object_interfaces.h" -#include "chardev/char.h" +#include "chardev/char-fe.h" #include "sysemu/hostmem.h" #include "sysemu/qtest.h" #include "qapi/visitor.h" diff --git a/hw/usb/ccid-card-passthru.c b/hw/usb/ccid-card-passthru.c index c2096b25ab..fed3683a50 100644 --- a/hw/usb/ccid-card-passthru.c +++ b/hw/usb/ccid-card-passthru.c @@ -9,7 +9,7 @@ */ #include "qemu/osdep.h" -#include "chardev/char.h" +#include "chardev/char-fe.h" #include "qemu/error-report.h" #include "qemu/sockets.h" #include "ccid.h" diff --git a/hw/usb/dev-serial.c b/hw/usb/dev-serial.c index 8baf040b5f..bfbf7cdce7 100644 --- a/hw/usb/dev-serial.c +++ b/hw/usb/dev-serial.c @@ -16,6 +16,7 @@ #include "hw/usb.h" #include "hw/usb/desc.h" #include "chardev/char-serial.h" +#include "chardev/char-fe.h" //#define DEBUG_Serial diff --git a/hw/usb/redirect.c b/hw/usb/redirect.c index c862c1adea..d2b3a84a03 100644 --- a/hw/usb/redirect.c +++ b/hw/usb/redirect.c @@ -33,7 +33,7 @@ #include "qapi/qmp/qerror.h" #include "qemu/error-report.h" #include "qemu/iov.h" -#include "chardev/char.h" +#include "chardev/char-fe.h" #include #include diff --git a/hw/virtio/vhost-user.c b/hw/virtio/vhost-user.c index 44c9d8c954..0aa446eb91 100644 --- a/hw/virtio/vhost-user.c +++ b/hw/virtio/vhost-user.c @@ -13,7 +13,7 @@ #include "hw/virtio/vhost.h" #include "hw/virtio/vhost-backend.h" #include "hw/virtio/virtio-net.h" -#include "chardev/char.h" +#include "chardev/char-fe.h" #include "sysemu/kvm.h" #include "qemu/error-report.h" #include "qemu/sockets.h" -- cgit v1.2.3 From 1ce2610c106d925387669b3133fc18ea986f0476 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= Date: Fri, 27 Jan 2017 00:49:13 +0400 Subject: char: make chr_fe_deinit() optionaly delete backend MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This simplifies removing a backend for a frontend user (no need to retrieve the associated driver and separate delete call etc). NB: many frontends have questionable handling of ending a chardev. They should probably delete the backend to prevent broken reusage. Signed-off-by: Marc-André Lureau Reviewed-by: Philippe Mathieu-Daudé --- hw/char/serial.c | 2 +- hw/char/xen_console.c | 2 +- hw/core/qdev-properties-system.c | 2 +- hw/usb/ccid-card-passthru.c | 5 +---- hw/usb/redirect.c | 4 +--- 5 files changed, 5 insertions(+), 10 deletions(-) (limited to 'hw') diff --git a/hw/char/serial.c b/hw/char/serial.c index 23e5fe9d18..e1f12507bf 100644 --- a/hw/char/serial.c +++ b/hw/char/serial.c @@ -905,7 +905,7 @@ void serial_realize_core(SerialState *s, Error **errp) void serial_exit_core(SerialState *s) { - qemu_chr_fe_deinit(&s->chr); + qemu_chr_fe_deinit(&s->chr, false); timer_del(s->modem_status_poll); timer_free(s->modem_status_poll); diff --git a/hw/char/xen_console.c b/hw/char/xen_console.c index cb849c2e3e..f9af8cadf4 100644 --- a/hw/char/xen_console.c +++ b/hw/char/xen_console.c @@ -261,7 +261,7 @@ static void con_disconnect(struct XenDevice *xendev) { struct XenConsole *con = container_of(xendev, struct XenConsole, xendev); - qemu_chr_fe_deinit(&con->chr); + qemu_chr_fe_deinit(&con->chr, false); xen_pv_unbind_evtchn(&con->xendev); if (con->sring) { diff --git a/hw/core/qdev-properties-system.c b/hw/core/qdev-properties-system.c index a549d39030..3bef41914d 100644 --- a/hw/core/qdev-properties-system.c +++ b/hw/core/qdev-properties-system.c @@ -225,7 +225,7 @@ static void release_chr(Object *obj, const char *name, void *opaque) Property *prop = opaque; CharBackend *be = qdev_get_prop_ptr(dev, prop); - qemu_chr_fe_deinit(be); + qemu_chr_fe_deinit(be, false); } PropertyInfo qdev_prop_chr = { diff --git a/hw/usb/ccid-card-passthru.c b/hw/usb/ccid-card-passthru.c index fed3683a50..ac1725eeae 100644 --- a/hw/usb/ccid-card-passthru.c +++ b/hw/usb/ccid-card-passthru.c @@ -264,10 +264,7 @@ static void ccid_card_vscard_handle_message(PassthruState *card, static void ccid_card_vscard_drop_connection(PassthruState *card) { - Chardev *chr = qemu_chr_fe_get_driver(&card->cs); - - qemu_chr_fe_deinit(&card->cs); - object_unparent(OBJECT(chr)); + qemu_chr_fe_deinit(&card->cs, true); card->vscard_in_pos = card->vscard_in_hdr = 0; } diff --git a/hw/usb/redirect.c b/hw/usb/redirect.c index d2b3a84a03..aa22d69216 100644 --- a/hw/usb/redirect.c +++ b/hw/usb/redirect.c @@ -1419,10 +1419,8 @@ static void usbredir_cleanup_device_queues(USBRedirDevice *dev) static void usbredir_unrealize(USBDevice *udev, Error **errp) { USBRedirDevice *dev = USB_REDIRECT(udev); - Chardev *chr = qemu_chr_fe_get_driver(&dev->cs); - qemu_chr_fe_deinit(&dev->cs); - object_unparent(OBJECT(chr)); + qemu_chr_fe_deinit(&dev->cs, true); /* Note must be done after qemu_chr_close, as that causes a close event */ qemu_bh_delete(dev->chardev_close_bh); -- cgit v1.2.3