aboutsummaryrefslogtreecommitdiff
path: root/hw/input/virtio-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/virtio-input-hid.c
parent08d45942972ada0e4d051799fb8ba1b47225a6b3 (diff)
downloadqemu-b1be65f6436f53618408d9c6fc6959054f5afed6.zip
qemu-b1be65f6436f53618408d9c6fc6959054f5afed6.tar.gz
qemu-b1be65f6436f53618408d9c6fc6959054f5afed6.tar.bz2
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/virtio-input-hid.c')
-rw-r--r--hw/input/virtio-input-hid.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/hw/input/virtio-input-hid.c b/hw/input/virtio-input-hid.c
index 7053ad7..45e4d4c 100644
--- a/hw/input/virtio-input-hid.c
+++ b/hw/input/virtio-input-hid.c
@@ -265,7 +265,7 @@ static const TypeInfo virtio_input_hid_info = {
/* ----------------------------------------------------------------- */
-static QemuInputHandler virtio_keyboard_handler = {
+static const QemuInputHandler virtio_keyboard_handler = {
.name = VIRTIO_ID_NAME_KEYBOARD,
.mask = INPUT_EVENT_MASK_KEY,
.event = virtio_input_handle_event,
@@ -322,7 +322,7 @@ static const TypeInfo virtio_keyboard_info = {
/* ----------------------------------------------------------------- */
-static QemuInputHandler virtio_mouse_handler = {
+static const QemuInputHandler virtio_mouse_handler = {
.name = VIRTIO_ID_NAME_MOUSE,
.mask = INPUT_EVENT_MASK_BTN | INPUT_EVENT_MASK_REL,
.event = virtio_input_handle_event,
@@ -416,7 +416,7 @@ static const TypeInfo virtio_mouse_info = {
/* ----------------------------------------------------------------- */
-static QemuInputHandler virtio_tablet_handler = {
+static const QemuInputHandler virtio_tablet_handler = {
.name = VIRTIO_ID_NAME_TABLET,
.mask = INPUT_EVENT_MASK_BTN | INPUT_EVENT_MASK_ABS,
.event = virtio_input_handle_event,
@@ -541,7 +541,7 @@ static const TypeInfo virtio_tablet_info = {
/* ----------------------------------------------------------------- */
-static QemuInputHandler virtio_multitouch_handler = {
+static const QemuInputHandler virtio_multitouch_handler = {
.name = VIRTIO_ID_NAME_MULTITOUCH,
.mask = INPUT_EVENT_MASK_BTN | INPUT_EVENT_MASK_MTT,
.event = virtio_input_handle_event,