提交 1a49a0a0 编写于 作者: J JJ Ding 提交者: Dmitry Torokhov

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: NJJ Ding <dgdunix@gmail.com>
Reviewed-by: NDaniel Kurtz <djkurtz@chromium.org>
Signed-off-by: NDmitry Torokhov <dtor@mail.ru>
上级 f4eea7e2
...@@ -45,16 +45,6 @@ ...@@ -45,16 +45,6 @@
#define YMIN_NOMINAL 1408 #define YMIN_NOMINAL 1408
#define YMAX_NOMINAL 4448 #define YMAX_NOMINAL 4448
/*
* Synaptics touchpads report the y coordinate from bottom to top, which is
* opposite from what userspace expects.
* This function is used to invert y before reporting.
*/
static int synaptics_invert_y(int y)
{
return YMAX_NOMINAL + YMIN_NOMINAL - y;
}
/***************************************************************************** /*****************************************************************************
* Stuff we need even when we do not want native Synaptics support * Stuff we need even when we do not want native Synaptics support
...@@ -111,6 +101,16 @@ void synaptics_reset(struct psmouse *psmouse) ...@@ -111,6 +101,16 @@ void synaptics_reset(struct psmouse *psmouse)
* Synaptics communications functions * Synaptics communications functions
****************************************************************************/ ****************************************************************************/
/*
* Synaptics touchpads report the y coordinate from bottom to top, which is
* opposite from what userspace expects.
* This function is used to invert y before reporting.
*/
static int synaptics_invert_y(int y)
{
return YMAX_NOMINAL + YMIN_NOMINAL - y;
}
/* /*
* Send a command to the synpatics touchpad by special commands * Send a command to the synpatics touchpad by special commands
*/ */
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册