Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

Input: cyttsp4 - move 'cyttsp4_tch_abs_string' to the only file that references it

Fixes the following W=1 kernel build warning(s):

In file included from drivers/input/touchscreen/cyttsp_i2c_common.c:24:
drivers/input/touchscreen/cyttsp4_core.h:236:27: warning: ‘cyttsp4_tch_abs_string’ defined but not used [-Wunused-const-variable=]
236 | static const char const cyttsp4_tch_abs_string[] = {
| ^~~~~~~~~~~~~~~~~~~~~~
In file included from drivers/input/touchscreen/cyttsp4_i2c.c:17:
drivers/input/touchscreen/cyttsp4_core.h:236:27: warning: ‘cyttsp4_tch_abs_string’ defined but not used [-Wunused-const-variable=]
236 | static const char * const cyttsp4_tch_abs_string[] = {
| ^~~~~~~~~~~~~~~~~~~~~~
In file included from drivers/input/touchscreen/cyttsp4_spi.c:17:
drivers/input/touchscreen/cyttsp4_core.h:236:27: warning: ‘cyttsp4_tch_abs_string’ defined but not used [-Wunused-const-variable=]
236 | static const char * const cyttsp4_tch_abs_string[] = {
| ^~~~~~~~~~~~~~~~~~~~~~

Signed-off-by: Lee Jones <lee.jones@linaro.org>
Link: https://lore.kernel.org/r/20201104162427.2984742-16-lee.jones@linaro.org
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>

authored by

Lee Jones and committed by
Dmitry Torokhov
45353186 136feb4c

+14 -14
+14
drivers/input/touchscreen/cyttsp4_core.c
··· 30 30 31 31 #define CY_CORE_STARTUP_RETRY_COUNT 3 32 32 33 + static const char * const cyttsp4_tch_abs_string[] = { 34 + [CY_TCH_X] = "X", 35 + [CY_TCH_Y] = "Y", 36 + [CY_TCH_P] = "P", 37 + [CY_TCH_T] = "T", 38 + [CY_TCH_E] = "E", 39 + [CY_TCH_O] = "O", 40 + [CY_TCH_W] = "W", 41 + [CY_TCH_MAJ] = "MAJ", 42 + [CY_TCH_MIN] = "MIN", 43 + [CY_TCH_OR] = "OR", 44 + [CY_TCH_NUM_ABS] = "INVALID" 45 + }; 46 + 33 47 static const u8 ldr_exit[] = { 34 48 0xFF, 0x01, 0x3B, 0x00, 0x00, 0x4F, 0x6D, 0x17 35 49 };
-14
drivers/input/touchscreen/cyttsp4_core.h
··· 233 233 CY_TCH_NUM_ABS 234 234 }; 235 235 236 - static const char * const cyttsp4_tch_abs_string[] = { 237 - [CY_TCH_X] = "X", 238 - [CY_TCH_Y] = "Y", 239 - [CY_TCH_P] = "P", 240 - [CY_TCH_T] = "T", 241 - [CY_TCH_E] = "E", 242 - [CY_TCH_O] = "O", 243 - [CY_TCH_W] = "W", 244 - [CY_TCH_MAJ] = "MAJ", 245 - [CY_TCH_MIN] = "MIN", 246 - [CY_TCH_OR] = "OR", 247 - [CY_TCH_NUM_ABS] = "INVALID" 248 - }; 249 - 250 236 struct cyttsp4_touch { 251 237 int abs[CY_TCH_NUM_ABS]; 252 238 };