hw/input/tsc2xxx: Reduce MouseTransformInfo structure exposure
PATCH 1/1 hw/input/tsc2xxx: Reduce MouseTransformInfo structure exposure
Commit a5d7eb6534a ("Add TSC2301 touchscreen & keypad controller") added the MouseTransformInfo declaration in "ui/console.h", however it is only used in "hw/input/tsc2xxx.h".
Reduce the structure exposure by moving it to the single include where it is used.
This should fix a build failure on OpenBSD:
In file included from hw/arm/nseries.c:30:
In file included from include/hw/arm/omap.h:24:
In file included from include/hw/input/tsc2xxx.h:14:
include/ui/console.h:11:11: fatal error: 'epoxy/gl.h' file not found
# include <epoxy/gl.h>
^~~~~~~~~~~~
1 error generated.
gmake: *** [Makefile.ninja:1735:
libqemu-aarch64-softmmu.fa.p/hw_arm_nseries.c.o] Error 1--- include/hw/input/tsc2xxx.h | 8 +++++++- include/ui/console.h | 8 -------- 2 files changed, 7 insertions(+), 9 deletions(-)
include/hw/input/tsc2xxx.h +7 -1
@@ -11,7 +11,13 @@ #ifndef HW_INPUT_TSC2XXX_H #define HW_INPUT_TSC2XXX_H -#include "ui/console.h" +typedef struct MouseTransformInfo { + /* Touchscreen resolution */ + int x; + int y; + /* Calibration values as used/generated by tslib */ + int a[7]; +} MouseTransformInfo; typedef struct uWireSlave { uint16_t (*receive)(void *opaque);
include/ui/console.h +0 -8
@@ -65,14 +65,6 @@ void qemu_remove_led_event_handler(QEMUPutLEDEntry *entry);void kbd_put_ledstate (int ledstate); -typedef struct MouseTransformInfo { -/* Touchscreen resolution */ -int x; -int y; -/* Calibration values as used/generated by tslib */ -int a[7 ]; -}MouseTransformInfo ; -void hmp_mouse_set (Monitor *mon,const QDict *qdict);/* keysym is a unicode code except for special keys (see QEMU_KEY_xxx
Signature · 1 line
2.26.2
ping?
Quoted 64 lines · Philippe Mathieu-Daudé
Commit
a5d7eb6534a("Add TSC2301 touchscreen & keypad controller") added the MouseTransformInfo declaration in "ui/console.h", however it is only used in "hw/input/tsc2xxx.h".
Reduce the structure exposure by moving it to the single include where it is used.This should fix a build failure on OpenBSD:
In file included from
hw/arm/nseries.c:30:
In file included frominclude/hw/arm/omap.h:24:
In file included frominclude/hw/input/tsc2xxx.h:14:
include/ui/console.h:11:11: fatal error: 'epoxy/gl.h' file not found# include <epoxy/gl.h> ^~~~~~~~~~~~ 1 error generated. gmake: *** [Makefile.ninja:1735: libqemu-aarch64-softmmu.fa.p/hw_arm_nseries.c.o] Error 1Reported-by Peter Maydell <[email protected]>Signed-off-by Philippe Mathieu-Daudé <[email protected]>--- include/hw/input/tsc2xxx.h | 8 +++++++- include/ui/console.h | 8 -------- 2 files changed, 7 insertions(+), 9 deletions(-)include/hw/input/tsc2xxx.h +7
-1@@ -11,7 +11,13 @@ #ifndef HW_INPUT_TSC2XXX_H #define HW_INPUT_TSC2XXX_H -#include "ui/console.h" +typedef struct MouseTransformInfo { + /* Touchscreen resolution */ + int x; + int y; + /* Calibration values as used/generated by tslib */ + int a[7]; +} MouseTransformInfo; typedef struct uWireSlave { uint16_t (*receive)(void *opaque);include/ui/console.h +0
-8@@ -65,14 +65,6 @@ void qemu_remove_led_event_handler(QEMUPutLEDEntry *entry);void kbd_put_ledstate (int ledstate); -typedef struct MouseTransformInfo { -/* Touchscreen resolution */ -int x; -int y; -/* Calibration values as used/generated by tslib */ -int a[7 ]; -}MouseTransformInfo ; -void hmp_mouse_set (Monitor *mon,const QDict *qdict);/* keysym is a unicode code except for special keys (see QEMU_KEY_xxx