aboutsummaryrefslogtreecommitdiff
path: root/hw/input/hid.c
diff options
context:
space:
mode:
authorPhilippe Mathieu-Daudé <philmd@linaro.org>2023-10-17 15:05:00 +0200
committerPhilippe Mathieu-Daudé <philmd@linaro.org>2023-10-19 23:13:28 +0200
commitb1be65f6436f53618408d9c6fc6959054f5afed6 (patch)
tree664d1a3f87e6d78c5476e06d199ac79c34397942 /hw/input/hid.c
parent08d45942972ada0e4d051799fb8ba1b47225a6b3 (diff)
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>
Diffstat (limited to 'hw/input/hid.c')
-rw-r--r--hw/input/hid.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/hw/input/hid.c b/hw/input/hid.c
index a9c7dd1ce1..b8e85374ca 100644
--- a/hw/input/hid.c
+++ b/hw/input/hid.c
@@ -510,20 +510,20 @@ void hid_free(HIDState *hs)
hid_del_idle_timer(hs);
}
-static QemuInputHandler hid_keyboard_handler = {
+static const QemuInputHandler hid_keyboard_handler = {
.name = "QEMU HID Keyboard",
.mask = INPUT_EVENT_MASK_KEY,
.event = hid_keyboard_event,
};
-static QemuInputHandler hid_mouse_handler = {
+static const QemuInputHandler hid_mouse_handler = {
.name = "QEMU HID Mouse",
.mask = INPUT_EVENT_MASK_BTN | INPUT_EVENT_MASK_REL,
.event = hid_pointer_event,
.sync = hid_pointer_sync,
};
-static QemuInputHandler hid_tablet_handler = {
+static const QemuInputHandler hid_tablet_handler = {
.name = "QEMU HID Tablet",
.mask = INPUT_EVENT_MASK_BTN | INPUT_EVENT_MASK_ABS,
.event = hid_pointer_event,