ps2: implement ps2_kbd_realize() and use it to register ps2_keyboard_handler
authorMark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
Fri, 24 Jun 2022 13:40:25 +0000 (14:40 +0100)
committerMark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
Sun, 26 Jun 2022 17:40:11 +0000 (18:40 +0100)
commitea247a0f3696a0ccdbc7ab818c1c15e5b53e4c31
treeb1d490c01fc0834f01eefc358911c786ccf123a9
parenta243ecf8c09efd25a09f28e41eca0fea4f3444a0
ps2: implement ps2_kbd_realize() and use it to register ps2_keyboard_handler

Move the registration of ps2_keyboard_handler from ps2_kbd_init() to a new
ps2_kbd_realize() function. Since the abstract PS2_DEVICE parent class doesn't
have a realize() function then it is not necessary to store the reference to
it in PS2DeviceClass and use device_class_set_parent_realize().

Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Acked-by: Helge Deller <deller@gmx.de>
Message-Id: <20220624134109.881989-11-mark.cave-ayland@ilande.co.uk>
hw/input/ps2.c