diff options
author | Peter Maydell <peter.maydell@linaro.org> | 2017-06-05 10:09:14 +0100 |
---|---|---|
committer | Peter Maydell <peter.maydell@linaro.org> | 2017-06-05 10:09:14 +0100 |
commit | cb8b8ef4578dc17c350fd4b27700a9f178e2dad0 (patch) | |
tree | 6bd382062ac77cc25bece492b78e15fec2a313e5 /hw | |
parent | c6e84fbd447a51e1161d74d71566a5f67b47eac5 (diff) | |
parent | 6b10e573d15ef82dbc5c5b3726028e6642e134f6 (diff) | |
download | qemu-cb8b8ef4578dc17c350fd4b27700a9f178e2dad0.zip qemu-cb8b8ef4578dc17c350fd4b27700a9f178e2dad0.tar.gz qemu-cb8b8ef4578dc17c350fd4b27700a9f178e2dad0.tar.bz2 |
Merge remote-tracking branch 'remotes/elmarco/tags/chrfe-pull-request' into staging
# gpg: Signature made Fri 02 Jun 2017 20:12:48 BST
# gpg: using RSA key 0xDAE8E10975969CE5
# gpg: Good signature from "Marc-André Lureau <marcandre.lureau@redhat.com>"
# gpg: aka "Marc-André Lureau <marcandre.lureau@gmail.com>"
# gpg: WARNING: This key is not certified with sufficiently trusted signatures!
# gpg: It is not certain that the signature belongs to the owner.
# Primary key fingerprint: 87A9 BD93 3F87 C606 D276 F62D DAE8 E109 7596 9CE5
* remotes/elmarco/tags/chrfe-pull-request:
char: move char devices to chardev/
char: make chr_fe_deinit() optionaly delete backend
char: rename functions that are not part of fe
char: move CharBackend handling in char-fe unit
char: generalize qemu_chr_write_all()
be-hci: use backend functions
chardev: serial & parallel declaration to own headers
chardev: move headers to include/chardev
Remove/replace sysemu/char.h inclusion
char-win: close file handle except with console
char-win: rename hcom->file
char-win: rename win_chr_init/poll win_chr_serial_init/poll
char-win: remove WinChardev.len
char-win: simplify win_chr_read()
char: cast ARRAY_SIZE() as signed to silent warning on empty array
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Diffstat (limited to 'hw')
55 files changed, 58 insertions, 71 deletions
diff --git a/hw/arm/bcm2835_peripherals.c b/hw/arm/bcm2835_peripherals.c index 369ef1e..502f04c 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/arm/fsl-imx25.c b/hw/arm/fsl-imx25.c index 9056f27..40666b6 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 d7e2d83..c301306 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 6969e73..27773c9 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 8afb854..91f5733 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-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 eea551d..629e6c6 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-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 3311cc3..7683edc 100644 --- a/hw/arm/strongarm.c +++ b/hw/arm/strongarm.c @@ -34,7 +34,8 @@ #include "strongarm.h" #include "qemu/error-report.h" #include "hw/arm/arm.h" -#include "sysemu/char.h" +#include "chardev/char-fe.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 3c19384..d13192b 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-serial.h" #include "qemu/timer.h" #include "qemu/bswap.h" #include "hw/irq.h" @@ -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; diff --git a/hw/char/cadence_uart.c b/hw/char/cadence_uart.c index 4dcee57..4a2c124 100644 --- a/hw/char/cadence_uart.c +++ b/hw/char/cadence_uart.c @@ -23,7 +23,8 @@ #include "qemu/osdep.h" #include "hw/sysbus.h" -#include "sysemu/char.h" +#include "chardev/char-fe.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/debugcon.c b/hw/char/debugcon.c index 80dce07..762e3d8 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-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 029f5bb..34306e1 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-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 9228091..3f78763 100644 --- a/hw/char/escc.c +++ b/hw/char/escc.c @@ -26,7 +26,8 @@ #include "hw/hw.h" #include "hw/sysbus.h" #include "hw/char/escc.h" -#include "sysemu/char.h" +#include "chardev/char-fe.h" +#include "chardev/char-serial.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 5438387..c1fba9f 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-fe.h" #include "qemu/log.h" #define D(x) diff --git a/hw/char/exynos4210_uart.c b/hw/char/exynos4210_uart.c index bff706a..b51d44a 100644 --- a/hw/char/exynos4210_uart.c +++ b/hw/char/exynos4210_uart.c @@ -23,7 +23,8 @@ #include "hw/sysbus.h" #include "qemu/error-report.h" #include "sysemu/sysemu.h" -#include "sysemu/char.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 db686e6..32d98ed 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-fe.h" #include "trace.h" diff --git a/hw/char/imx_serial.c b/hw/char/imx_serial.c index 52e67f8..af25030 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/char/ipoctal232.c b/hw/char/ipoctal232.c index 93929c2..337a3e56 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-fe.h" /* #define DEBUG_IPOCTAL */ diff --git a/hw/char/lm32_juart.c b/hw/char/lm32_juart.c index f8c1e0d..3948dcd 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-fe.h" #include "hw/char/lm32_juart.h" diff --git a/hw/char/lm32_uart.c b/hw/char/lm32_uart.c index 7f3597c..cff8c38 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-fe.h" #include "qemu/error-report.h" enum { diff --git a/hw/char/mcf_uart.c b/hw/char/mcf_uart.c index e69672f..fe12ad5 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-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 ae8e2f3..e19d0f6 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-fe.h" #include "qemu/error-report.h" enum { diff --git a/hw/char/omap_uart.c b/hw/char/omap_uart.c index 31ebb15..6fd1b9c 100644 --- a/hw/char/omap_uart.c +++ b/hw/char/omap_uart.c @@ -18,7 +18,7 @@ * with this program; if not, see <http://www.gnu.org/licenses/>. */ #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 c71a4a0..75a1a2f 100644 --- a/hw/char/parallel.c +++ b/hw/char/parallel.c @@ -25,7 +25,8 @@ #include "qemu/osdep.h" #include "qapi/error.h" #include "hw/hw.h" -#include "sysemu/char.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 24ea973..33802f0 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-fe.h" #include "qemu/log.h" #include "trace.h" diff --git a/hw/char/sclpconsole-lm.c b/hw/char/sclpconsole-lm.c index 07d6ebd..1b15046 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-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 b78f240..4a107a2 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-fe.h" typedef struct ASCIIConsoleData { EventBufferHeader ebh; diff --git a/hw/char/serial.c b/hw/char/serial.c index 03d890c..e1f1250 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-serial.h" #include "qapi/error.h" #include "qemu/timer.h" #include "exec/address-spaces.h" @@ -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/sh_serial.c b/hw/char/sh_serial.c index 303eb0a..ca9816d 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-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 e30c8da..8f02f3a 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-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 b2dda01..7b10a04 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-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 798d9b6..0cb1668 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-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 c01f410..f9af8ca 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-fe.h" #include "hw/xen/xen_backend.h" #include "qapi/error.h" @@ -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/char/xilinx_uartlite.c b/hw/char/xilinx_uartlite.c index 37d313b..71ed2fc 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-fe.h" #define DUART(x) diff --git a/hw/core/qdev-properties-system.c b/hw/core/qdev-properties-system.c index 79c2014..3bef419 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-fe.h" #include "sysemu/iothread.h" static void get_pointer(Object *obj, Visitor *v, Property *prop, @@ -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/core/qdev-properties.c b/hw/core/qdev-properties.c index fa3617d..9f1a497 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/display/xenfb.c b/hw/display/xenfb.c index 7a8727a..e76c0d8 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 <xen/event_channel.h> diff --git a/hw/i386/xen/xen-hvm.c b/hw/i386/xen/xen-hvm.c index 919f09b..1acd4de 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/ipmi/ipmi_bmc_extern.c b/hw/ipmi/ipmi_bmc_extern.c index e8e3d25..329b03e 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-fe.h" #include "sysemu/sysemu.h" #include "hw/ipmi/ipmi.h" diff --git a/hw/isa/pc87312.c b/hw/isa/pc87312.c index c707d24..5ce9f0a 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 53d1e0c..a4677f7 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/mips/mips_fulong2e.c b/hw/mips/mips_fulong2e.c index e636c3a..dbe2805 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 7814c39..95cdabb 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/misc/ivshmem.c b/hw/misc/ivshmem.c index 475e36a..6367d04 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-fe.h" #include "sysemu/hostmem.h" #include "sysemu/qtest.h" #include "qapi/visitor.h" diff --git a/hw/net/xgmac.c b/hw/net/xgmac.c index 46b1aa1..0843bf1 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 73e2a18..57acd85 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 128d993..b666a4c 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 6e16478..f415997 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 9962786..e646eb2 100644 --- a/hw/usb/ccid-card-emulated.c +++ b/hw/usb/ccid-card-emulated.c @@ -33,7 +33,7 @@ #include <vcard_emul.h> #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/usb/ccid-card-passthru.c b/hw/usb/ccid-card-passthru.c index a41b0d6..ac1725e 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-fe.h" #include "qemu/error-report.h" #include "qemu/sockets.h" #include "ccid.h" @@ -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/dev-serial.c b/hw/usb/dev-serial.c index 76ceca1..bfbf7cd 100644 --- a/hw/usb/dev-serial.c +++ b/hw/usb/dev-serial.c @@ -15,7 +15,8 @@ #include "qemu/error-report.h" #include "hw/usb.h" #include "hw/usb/desc.h" -#include "sysemu/char.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 ad5ef78..aa22d69 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-fe.h" #include <usbredirparser.h> #include <usbredirfilter.h> @@ -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); diff --git a/hw/virtio/vhost-user.c b/hw/virtio/vhost-user.c index 7a9bb1d..958ee09 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-fe.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 a9055e9..0bed577 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/xen/xen_backend.c b/hw/xen/xen_backend.c index 3570f37..c46cbb0 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" diff --git a/hw/xtensa/xtfpga.c b/hw/xtensa/xtfpga.c index 4636f8e9..d5ac080 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" |