diff options
author | Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk> | 2022-06-24 14:40:45 +0100 |
---|---|---|
committer | Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk> | 2022-06-26 18:40:12 +0100 |
commit | 488d1537a1f59018db57ea8293a7084e8ee71a86 (patch) | |
tree | 1fe49a2e4acebf0fd2e75de572419bfb61a7f83c /hw/input | |
parent | 75877e9356638b6446f634298923be5c088a3a60 (diff) |
pckbd: move ps2_kbd_init() and ps2_mouse_init() to i8042_mmio_realize()
Move ps2_kbd_init() and ps2_mouse_init() from i8042_mm_init() to
i8042_mmio_realize() to further reduce the initialisation logic done in
i8042_mm_init().
Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
Acked-by: Helge Deller <deller@gmx.de>
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Message-Id: <20220624134109.881989-31-mark.cave-ayland@ilande.co.uk>
Diffstat (limited to 'hw/input')
-rw-r--r-- | hw/input/pckbd.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/hw/input/pckbd.c b/hw/input/pckbd.c index 1ab76793ea..72843f770e 100644 --- a/hw/input/pckbd.c +++ b/hw/input/pckbd.c @@ -685,6 +685,9 @@ static void i8042_mmio_realize(DeviceState *dev, Error **errp) /* Note we can't use dc->vmsd without breaking migration compatibility */ vmstate_register(NULL, 0, &vmstate_kbd, ks); + + ks->kbd = ps2_kbd_init(kbd_update_kbd_irq, ks); + ks->mouse = ps2_mouse_init(kbd_update_aux_irq, ks); } static void i8042_mmio_init(Object *obj) @@ -726,9 +729,6 @@ MMIOKBDState *i8042_mm_init(qemu_irq kbd_irq, qemu_irq mouse_irq, s->irq_kbd = kbd_irq; s->irq_mouse = mouse_irq; - s->kbd = ps2_kbd_init(kbd_update_kbd_irq, s); - s->mouse = ps2_mouse_init(kbd_update_aux_irq, s); - return I8042_MMIO(dev); } |