ui/input: Constify QemuInputHandler structure

Access to QemuInputHandlerState::handler are read-only.

Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Reviewed-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
Message-Id: <20231017131251.43708-1-philmd@linaro.org>
This commit is contained in:
Philippe Mathieu-Daudé 2023-10-17 15:05:00 +02:00
parent 08d4594297
commit b1be65f643
13 changed files with 22 additions and 22 deletions

View file

@ -1231,7 +1231,7 @@ static const VMStateDescription vmstate_ps2_mouse = {
}
};
static QemuInputHandler ps2_keyboard_handler = {
static const QemuInputHandler ps2_keyboard_handler = {
.name = "QEMU PS/2 Keyboard",
.mask = INPUT_EVENT_MASK_KEY,
.event = ps2_keyboard_event,
@ -1242,7 +1242,7 @@ static void ps2_kbd_realize(DeviceState *dev, Error **errp)
qemu_input_handler_register(dev, &ps2_keyboard_handler);
}
static QemuInputHandler ps2_mouse_handler = {
static const QemuInputHandler ps2_mouse_handler = {
.name = "QEMU PS/2 Mouse",
.mask = INPUT_EVENT_MASK_BTN | INPUT_EVENT_MASK_REL,
.event = ps2_mouse_event,