Skip to content

Commit 1a49a0a

Browse files
tengkt06dtor
authored andcommitted
Input: synaptics - fix compile warning
Move synaptics_invert_y() inside CONFIG_MOUSE_PS2_SYNAPTICS to get rid of a compile warning when we don't select synaptics support. drivers/input/mouse/synaptics.c:53:12: warning: ‘synaptics_invert_y’ defined but not used [-Wunused-function] Signed-off-by: JJ Ding <dgdunix@gmail.com> Reviewed-by: Daniel Kurtz <djkurtz@chromium.org> Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
1 parent f4eea7e commit 1a49a0a

File tree

1 file changed

+10
-10
lines changed

1 file changed

+10
-10
lines changed

drivers/input/mouse/synaptics.c

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -45,16 +45,6 @@
4545
#define YMIN_NOMINAL 1408
4646
#define YMAX_NOMINAL 4448
4747

48-
/*
49-
* Synaptics touchpads report the y coordinate from bottom to top, which is
50-
* opposite from what userspace expects.
51-
* This function is used to invert y before reporting.
52-
*/
53-
static int synaptics_invert_y(int y)
54-
{
55-
return YMAX_NOMINAL + YMIN_NOMINAL - y;
56-
}
57-
5848

5949
/*****************************************************************************
6050
* Stuff we need even when we do not want native Synaptics support
@@ -111,6 +101,16 @@ void synaptics_reset(struct psmouse *psmouse)
111101
* Synaptics communications functions
112102
****************************************************************************/
113103

104+
/*
105+
* Synaptics touchpads report the y coordinate from bottom to top, which is
106+
* opposite from what userspace expects.
107+
* This function is used to invert y before reporting.
108+
*/
109+
static int synaptics_invert_y(int y)
110+
{
111+
return YMAX_NOMINAL + YMIN_NOMINAL - y;
112+
}
113+
114114
/*
115115
* Send a command to the synpatics touchpad by special commands
116116
*/

0 commit comments

Comments
 (0)