From b4948be93e53c3b471666e51ce59303082626a2f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= Date: Sat, 22 Oct 2016 12:52:46 +0300 Subject: char: remove init callback MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The CharDriverState.init() callback is no longer set since commit a61ae7f88ce and thus unused. The only user, the malta FGPA display has been converted to use an event "opened" callback instead. Signed-off-by: Marc-André Lureau Message-Id: <20161022095318.17775-7-marcandre.lureau@redhat.com> Signed-off-by: Paolo Bonzini --- hw/arm/fsl-imx25.c | 2 +- hw/arm/fsl-imx31.c | 2 +- hw/arm/fsl-imx6.c | 2 +- hw/arm/omap2.c | 2 +- hw/char/exynos4210_uart.c | 2 +- hw/char/omap_uart.c | 4 ++-- hw/char/xen_console.c | 2 +- hw/isa/pc87312.c | 4 ++-- hw/mips/mips_malta.c | 4 ++-- hw/usb/dev-serial.c | 4 ++-- hw/xtensa/xtfpga.c | 2 +- 11 files changed, 15 insertions(+), 15 deletions(-) (limited to 'hw') diff --git a/hw/arm/fsl-imx25.c b/hw/arm/fsl-imx25.c index b4e358d..7bb7be76 100644 --- a/hw/arm/fsl-imx25.c +++ b/hw/arm/fsl-imx25.c @@ -125,7 +125,7 @@ static void fsl_imx25_realize(DeviceState *dev, Error **errp) if (!chr) { char label[20]; snprintf(label, sizeof(label), "imx31.uart%d", i); - chr = qemu_chr_new(label, "null", NULL); + chr = qemu_chr_new(label, "null"); } qdev_prop_set_chr(DEVICE(&s->uart[i]), "chardev", chr); diff --git a/hw/arm/fsl-imx31.c b/hw/arm/fsl-imx31.c index fe204ac..f23672b 100644 --- a/hw/arm/fsl-imx31.c +++ b/hw/arm/fsl-imx31.c @@ -114,7 +114,7 @@ static void fsl_imx31_realize(DeviceState *dev, Error **errp) if (!chr) { char label[20]; snprintf(label, sizeof(label), "imx31.uart%d", i); - chr = qemu_chr_new(label, "null", NULL); + chr = qemu_chr_new(label, "null"); } qdev_prop_set_chr(DEVICE(&s->uart[i]), "chardev", chr); diff --git a/hw/arm/fsl-imx6.c b/hw/arm/fsl-imx6.c index 6a1bf26..e93532f 100644 --- a/hw/arm/fsl-imx6.c +++ b/hw/arm/fsl-imx6.c @@ -193,7 +193,7 @@ static void fsl_imx6_realize(DeviceState *dev, Error **errp) if (!chr) { char *label = g_strdup_printf("imx6.uart%d", i + 1); - chr = qemu_chr_new(label, "null", NULL); + chr = qemu_chr_new(label, "null"); g_free(label); serial_hds[i] = chr; } diff --git a/hw/arm/omap2.c b/hw/arm/omap2.c index 7e11c65..0b2a355 100644 --- a/hw/arm/omap2.c +++ b/hw/arm/omap2.c @@ -798,7 +798,7 @@ static struct omap_sti_s *omap_sti_init(struct omap_target_agent_s *ta, s->irq = irq; omap_sti_reset(s); - s->chr = chr ?: qemu_chr_new("null", "null", NULL); + s->chr = chr ?: qemu_chr_new("null", "null"); memory_region_init_io(&s->iomem, NULL, &omap_sti_ops, s, "omap.sti", omap_l4_region_size(ta, 0)); diff --git a/hw/char/exynos4210_uart.c b/hw/char/exynos4210_uart.c index 1107578..66e6304 100644 --- a/hw/char/exynos4210_uart.c +++ b/hw/char/exynos4210_uart.c @@ -606,7 +606,7 @@ DeviceState *exynos4210_uart_create(hwaddr addr, chr = serial_hds[channel]; if (!chr) { snprintf(label, ARRAY_SIZE(label), "%s%d", chr_name, channel); - chr = qemu_chr_new(label, "null", NULL); + chr = qemu_chr_new(label, "null"); if (!(chr)) { error_report("Can't assign serial port to UART%d", channel); exit(1); diff --git a/hw/char/omap_uart.c b/hw/char/omap_uart.c index 415bec5..893ab10 100644 --- a/hw/char/omap_uart.c +++ b/hw/char/omap_uart.c @@ -63,7 +63,7 @@ struct omap_uart_s *omap_uart_init(hwaddr base, s->irq = irq; s->serial = serial_mm_init(get_system_memory(), base, 2, irq, omap_clk_getrate(fclk)/16, - chr ?: qemu_chr_new(label, "null", NULL), + chr ?: qemu_chr_new(label, "null"), DEVICE_NATIVE_ENDIAN); return s; } @@ -183,6 +183,6 @@ void omap_uart_attach(struct omap_uart_s *s, CharDriverState *chr) /* TODO: Should reuse or destroy current s->serial */ s->serial = serial_mm_init(get_system_memory(), s->base, 2, s->irq, omap_clk_getrate(s->fclk) / 16, - chr ?: qemu_chr_new("null", "null", NULL), + chr ?: qemu_chr_new("null", "null"), DEVICE_NATIVE_ENDIAN); } diff --git a/hw/char/xen_console.c b/hw/char/xen_console.c index 83108b0..11bf6a4 100644 --- a/hw/char/xen_console.c +++ b/hw/char/xen_console.c @@ -199,7 +199,7 @@ static int con_init(struct XenDevice *xendev) con->chr = serial_hds[con->xendev.dev]; } else { snprintf(label, sizeof(label), "xencons%d", con->xendev.dev); - con->chr = qemu_chr_new(label, output, NULL); + con->chr = qemu_chr_new(label, output); } xenstore_store_pv_console_info(con->xendev.dev, con->chr); diff --git a/hw/isa/pc87312.c b/hw/isa/pc87312.c index c3ebf3e..b1c1a0a 100644 --- a/hw/isa/pc87312.c +++ b/hw/isa/pc87312.c @@ -283,7 +283,7 @@ static void pc87312_realize(DeviceState *dev, Error **errp) /* FIXME use a qdev chardev prop instead of parallel_hds[] */ chr = parallel_hds[0]; if (chr == NULL) { - chr = qemu_chr_new("par0", "null", NULL); + chr = qemu_chr_new("par0", "null"); } isa = isa_create(bus, "isa-parallel"); d = DEVICE(isa); @@ -303,7 +303,7 @@ static void pc87312_realize(DeviceState *dev, Error **errp) chr = serial_hds[i]; if (chr == NULL) { snprintf(name, sizeof(name), "ser%d", i); - chr = qemu_chr_new(name, "null", NULL); + chr = qemu_chr_new(name, "null"); } isa = isa_create(bus, "isa-serial"); d = DEVICE(isa); diff --git a/hw/mips/mips_malta.c b/hw/mips/mips_malta.c index 3aec6d8..ed0850c 100644 --- a/hw/mips/mips_malta.c +++ b/hw/mips/mips_malta.c @@ -566,7 +566,7 @@ static MaltaFPGAState *malta_fpga_init(MemoryRegion *address_space, memory_region_add_subregion(address_space, base, &s->iomem_lo); memory_region_add_subregion(address_space, base + 0xa00, &s->iomem_hi); - s->display = qemu_chr_new("fpga", "vc:320x200", NULL); + s->display = qemu_chr_new("fpga", "vc:320x200"); qemu_chr_add_handlers(s->display, NULL, NULL, malta_fgpa_display_event, s); @@ -1033,7 +1033,7 @@ void mips_malta_init(MachineState *machine) if (!serial_hds[i]) { char label[32]; snprintf(label, sizeof(label), "serial%d", i); - serial_hds[i] = qemu_chr_new(label, "null", NULL); + serial_hds[i] = qemu_chr_new(label, "null"); } } diff --git a/hw/usb/dev-serial.c b/hw/usb/dev-serial.c index 966ad84..61452b5 100644 --- a/hw/usb/dev-serial.c +++ b/hw/usb/dev-serial.c @@ -547,7 +547,7 @@ static USBDevice *usb_serial_init(USBBus *bus, const char *filename) filename++; snprintf(label, sizeof(label), "usbserial%d", index++); - cdrv = qemu_chr_new(label, filename, NULL); + cdrv = qemu_chr_new(label, filename); if (!cdrv) return NULL; @@ -565,7 +565,7 @@ static USBDevice *usb_braille_init(USBBus *bus, const char *unused) USBDevice *dev; CharDriverState *cdrv; - cdrv = qemu_chr_new("braille", "braille", NULL); + cdrv = qemu_chr_new("braille", "braille"); if (!cdrv) return NULL; diff --git a/hw/xtensa/xtfpga.c b/hw/xtensa/xtfpga.c index ac75949..dc6fdcc 100644 --- a/hw/xtensa/xtfpga.c +++ b/hw/xtensa/xtfpga.c @@ -265,7 +265,7 @@ static void lx_init(const LxBoardDesc *board, MachineState *machine) } if (!serial_hds[0]) { - serial_hds[0] = qemu_chr_new("serial0", "null", NULL); + serial_hds[0] = qemu_chr_new("serial0", "null"); } serial_mm_init(system_io, 0x0d050020, 2, xtensa_get_extint(env, 0), -- cgit v1.1