ps2: implement ps2_mouse_realize() and use it to register ps2_mouse_handler
authorMark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
Fri, 24 Jun 2022 13:40:26 +0000 (14:40 +0100)
committerMark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
Sun, 26 Jun 2022 17:40:11 +0000 (18:40 +0100)
commit4a68b4822ffceb40c34cf62847ff0da52532abb4
tree87f4b179c21339d43505fc6e31f9b2c12462ab41
parentea247a0f3696a0ccdbc7ab818c1c15e5b53e4c31
ps2: implement ps2_mouse_realize() and use it to register ps2_mouse_handler

Move the registration of ps2_mouse_handler from ps2_mouse_init() to a new
ps2_mouse_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-12-mark.cave-ayland@ilande.co.uk>
hw/input/ps2.c