mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-01 14:53:54 -06:00
hw/char: QOM'ify lm32_juart.c
* Drop the old SysBus init function * Call qemu_chr_add_handlers in the realize callback * Use qdev chardev prop instead of qemu_char_get_next_serial Signed-off-by: xiaoqiang zhao <zxq_yx_007@163.com> Message-Id: <1464158344-12266-4-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>
This commit is contained in:
parent
8290de92b8
commit
c2ddaa62b6
4 changed files with 14 additions and 13 deletions
|
@ -16,11 +16,12 @@ static inline DeviceState *lm32_pic_init(qemu_irq cpu_irq)
|
|||
return dev;
|
||||
}
|
||||
|
||||
static inline DeviceState *lm32_juart_init(void)
|
||||
static inline DeviceState *lm32_juart_init(CharDriverState *chr)
|
||||
{
|
||||
DeviceState *dev;
|
||||
|
||||
dev = qdev_create(NULL, TYPE_LM32_JUART);
|
||||
qdev_prop_set_chr(dev, "chardev", chr);
|
||||
qdev_init_nofail(dev);
|
||||
|
||||
return dev;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue