diff options
author | xiaoqiang zhao <zxq_yx_007@163.com> | 2016-05-25 14:39:04 +0800 |
---|---|---|
committer | Paolo Bonzini <pbonzini@redhat.com> | 2016-05-29 09:11:10 +0200 |
commit | e269fbe23163661c3147dee04c01bbb3b2550d42 (patch) | |
tree | 0fb03aedf27a49ca91a553169694c961f9df8eb9 /hw/lm32/milkymist-hw.h | |
parent | 7aaefcaf6628de1e25eb59a7790a0ae0f9a628f6 (diff) | |
download | qemu-e269fbe23163661c3147dee04c01bbb3b2550d42.zip qemu-e269fbe23163661c3147dee04c01bbb3b2550d42.tar.gz qemu-e269fbe23163661c3147dee04c01bbb3b2550d42.tar.bz2 |
hw/char: QOM'ify milkymist-uart.c
drop the qemu_char_get_next_serial and use chardev prop instead
Signed-off-by: xiaoqiang zhao <zxq_yx_007@163.com>
Message-Id: <1464158344-12266-6-git-send-email-zxq_yx_007@163.com>
Tested-by: Michael Walle <michael@walle.cc>
Acked-by: Michael Walle <michael@walle.cc>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'hw/lm32/milkymist-hw.h')
-rw-r--r-- | hw/lm32/milkymist-hw.h | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/hw/lm32/milkymist-hw.h b/hw/lm32/milkymist-hw.h index f857d28..eb6a3a2 100644 --- a/hw/lm32/milkymist-hw.h +++ b/hw/lm32/milkymist-hw.h @@ -5,11 +5,13 @@ #include "net/net.h" static inline DeviceState *milkymist_uart_create(hwaddr base, - qemu_irq irq) + qemu_irq irq, + CharDriverState *chr) { DeviceState *dev; dev = qdev_create(NULL, "milkymist-uart"); + qdev_prop_set_chr(dev, "chardev", chr); qdev_init_nofail(dev); sysbus_mmio_map(SYS_BUS_DEVICE(dev), 0, base); sysbus_connect_irq(SYS_BUS_DEVICE(dev), 0, irq); |