From 354abd4e8e17c3659b0c47f3b36155de71c7ca9e Mon Sep 17 00:00:00 2001 From: ligd Date: Wed, 11 Jan 2023 23:24:05 +0800 Subject: [PATCH] uinput: fix uinput compile failed, if no define CONFIG_UINPUT_TOUCH input/uinput.c:81:28: error: field 'lower' has incomplete type 81 | struct touch_lowerhalf_s lower; | ^~~~~ CC: pipes/pipe.c Signed-off-by: ligd --- drivers/input/uinput.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/drivers/input/uinput.c b/drivers/input/uinput.c index aedc939347..9453986351 100644 --- a/drivers/input/uinput.c +++ b/drivers/input/uinput.c @@ -72,6 +72,7 @@ struct uinput_context_s #endif /* CONFIG_UINPUT_RPMSG */ +#ifdef CONFIG_UINPUT_TOUCH struct uinput_touch_lowerhalf_s { #ifdef CONFIG_UINPUT_RPMSG @@ -80,7 +81,9 @@ struct uinput_touch_lowerhalf_s struct touch_lowerhalf_s lower; }; +#endif +#ifdef CONFIG_UINPUT_BUTTONS struct uinput_button_lowerhalf_s { #ifdef CONFIG_UINPUT_RPMSG @@ -92,7 +95,9 @@ struct uinput_button_lowerhalf_s btn_handler_t handler; FAR void *arg; }; +#endif +#ifdef CONFIG_UINPUT_KEYBOARD struct uinput_keyboard_lowerhalf_s { #ifdef CONFIG_UINPUT_RPMSG @@ -101,6 +106,7 @@ struct uinput_keyboard_lowerhalf_s struct keyboard_lowerhalf_s lower; }; +#endif /**************************************************************************** * Private Function Prototypes