qemu-arm
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-arm] [PATCH 6/7] hw/char/omap_uart: serial_mm_init() already check


From: Philippe Mathieu-Daudé
Subject: [Qemu-arm] [PATCH 6/7] hw/char/omap_uart: serial_mm_init() already check for null chr
Date: Thu, 31 Aug 2017 00:53:05 -0300

Signed-off-by: Philippe Mathieu-Daudé <address@hidden>
---
 hw/char/omap_uart.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/hw/char/omap_uart.c b/hw/char/omap_uart.c
index 6fd1b9cf6b..1f0ac0a053 100644
--- a/hw/char/omap_uart.c
+++ b/hw/char/omap_uart.c
@@ -63,8 +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"),
-                               DEVICE_NATIVE_ENDIAN);
+                               chr, DEVICE_NATIVE_ENDIAN);
     return s;
 }
 
@@ -183,6 +182,5 @@ void omap_uart_attach(struct omap_uart_s *s, Chardev *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"),
-                               DEVICE_NATIVE_ENDIAN);
+                               chr, DEVICE_NATIVE_ENDIAN);
 }
-- 
2.14.1




reply via email to

[Prev in Thread] Current Thread [Next in Thread]