[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL 24/34] hw/input/tsc2xxx: Constify set_transform()'s MouseTransform
From: |
Peter Maydell |
Subject: |
[PULL 24/34] hw/input/tsc2xxx: Constify set_transform()'s MouseTransformInfo arg |
Date: |
Thu, 5 Jan 2023 16:44:07 +0000 |
From: Philippe Mathieu-Daudé <philmd@linaro.org>
The pointed MouseTransformInfo structure is accessed read-only.
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Message-id: 20221220142520.24094-2-philmd@linaro.org
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
---
include/hw/input/tsc2xxx.h | 4 ++--
hw/input/tsc2005.c | 2 +-
hw/input/tsc210x.c | 3 +--
3 files changed, 4 insertions(+), 5 deletions(-)
diff --git a/include/hw/input/tsc2xxx.h b/include/hw/input/tsc2xxx.h
index 5b76ebc1776..00eca17674e 100644
--- a/include/hw/input/tsc2xxx.h
+++ b/include/hw/input/tsc2xxx.h
@@ -30,12 +30,12 @@ uWireSlave *tsc2102_init(qemu_irq pint);
uWireSlave *tsc2301_init(qemu_irq penirq, qemu_irq kbirq, qemu_irq dav);
I2SCodec *tsc210x_codec(uWireSlave *chip);
uint32_t tsc210x_txrx(void *opaque, uint32_t value, int len);
-void tsc210x_set_transform(uWireSlave *chip, MouseTransformInfo *info);
+void tsc210x_set_transform(uWireSlave *chip, const MouseTransformInfo *info);
void tsc210x_key_event(uWireSlave *chip, int key, int down);
/* tsc2005.c */
void *tsc2005_init(qemu_irq pintdav);
uint32_t tsc2005_txrx(void *opaque, uint32_t value, int len);
-void tsc2005_set_transform(void *opaque, MouseTransformInfo *info);
+void tsc2005_set_transform(void *opaque, const MouseTransformInfo *info);
#endif
diff --git a/hw/input/tsc2005.c b/hw/input/tsc2005.c
index 14698ce1097..555b6771738 100644
--- a/hw/input/tsc2005.c
+++ b/hw/input/tsc2005.c
@@ -523,7 +523,7 @@ void *tsc2005_init(qemu_irq pintdav)
* from the touchscreen. Assuming 12-bit precision was used during
* tslib calibration.
*/
-void tsc2005_set_transform(void *opaque, MouseTransformInfo *info)
+void tsc2005_set_transform(void *opaque, const MouseTransformInfo *info)
{
TSC2005State *s = (TSC2005State *) opaque;
diff --git a/hw/input/tsc210x.c b/hw/input/tsc210x.c
index df7313db5d7..fdd5ff87d94 100644
--- a/hw/input/tsc210x.c
+++ b/hw/input/tsc210x.c
@@ -1176,8 +1176,7 @@ I2SCodec *tsc210x_codec(uWireSlave *chip)
* from the touchscreen. Assuming 12-bit precision was used during
* tslib calibration.
*/
-void tsc210x_set_transform(uWireSlave *chip,
- MouseTransformInfo *info)
+void tsc210x_set_transform(uWireSlave *chip, const MouseTransformInfo *info)
{
TSC210xState *s = (TSC210xState *) chip->opaque;
#if 0
--
2.25.1
- [PULL 07/34] target/arm: Add PMSAv8r functionality, (continued)
- [PULL 07/34] target/arm: Add PMSAv8r functionality, Peter Maydell, 2023/01/05
- [PULL 12/34] hw/timer/imx_epit: define SR_OCIF, Peter Maydell, 2023/01/05
- [PULL 10/34] hw/timer/imx_epit: improve comments, Peter Maydell, 2023/01/05
- [PULL 13/34] hw/timer/imx_epit: update interrupt state on CR write access, Peter Maydell, 2023/01/05
- [PULL 09/34] target/arm: fix handling of HLT semihosting in system mode, Peter Maydell, 2023/01/05
- [PULL 06/34] target/arm: Add PMSAv8r registers, Peter Maydell, 2023/01/05
- [PULL 16/34] hw/timer/imx_epit: remove explicit fields cnt and freq, Peter Maydell, 2023/01/05
- [PULL 17/34] hw/timer/imx_epit: fix compare timer handling, Peter Maydell, 2023/01/05
- [PULL 14/34] hw/timer/imx_epit: hard reset initializes CR with 0, Peter Maydell, 2023/01/05
- [PULL 19/34] target/arm: Fix checkpatch space errors in helper.c, Peter Maydell, 2023/01/05
- [PULL 24/34] hw/input/tsc2xxx: Constify set_transform()'s MouseTransformInfo arg,
Peter Maydell <=
- [PULL 25/34] hw/arm/nseries: Constify various read-only arrays, Peter Maydell, 2023/01/05
- [PULL 23/34] target/arm: cleanup cpu includes, Peter Maydell, 2023/01/05
- [PULL 15/34] hw/timer/imx_epit: factor out register write handlers, Peter Maydell, 2023/01/05
- [PULL 21/34] target/arm: Remove unused includes from m_helper.c, Peter Maydell, 2023/01/05
- [PULL 22/34] target/arm: Remove unused includes from helper.c, Peter Maydell, 2023/01/05
- [PULL 20/34] target/arm: Fix checkpatch brace errors in helper.c, Peter Maydell, 2023/01/05
- [PULL 27/34] target/arm: align exposed ID registers with Linux, Peter Maydell, 2023/01/05
- [PULL 26/34] hw/arm/nseries: Silent -Wmissing-field-initializers warning, Peter Maydell, 2023/01/05
- [PULL 30/34] i.MX7D: Connect GPT timers to IRQ, Peter Maydell, 2023/01/05
- [PULL 33/34] i.MX7D: Connect IRQs to GPIO devices., Peter Maydell, 2023/01/05