From: Mathias Gottschlag Date: Sat, 7 Mar 2015 21:26:31 +0000 (-0800) Subject: Input: psmouse - remove hardcoded touchpad size from the focaltech driver X-Git-Tag: firefly_0821_release~176^2~541^2~93 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=3e9845251926723319fb60c9e546fe42d3d11687;p=firefly-linux-kernel-4.4.55.git Input: psmouse - remove hardcoded touchpad size from the focaltech driver The size has in most cases already been fetched from the touchpad, the hardcoded values should have been removed. Signed-off-by: Mathias Gottschlag Signed-off-by: Dmitry Torokhov --- diff --git a/drivers/input/mouse/focaltech.c b/drivers/input/mouse/focaltech.c index 757f78a94aec..e8fafe8785a7 100644 --- a/drivers/input/mouse/focaltech.c +++ b/drivers/input/mouse/focaltech.c @@ -67,9 +67,6 @@ static void focaltech_reset(struct psmouse *psmouse) #define FOC_MAX_FINGERS 5 -#define FOC_MAX_X 2431 -#define FOC_MAX_Y 1663 - /* * Current state of a single finger on the touchpad. */ @@ -131,7 +128,7 @@ static void focaltech_report_state(struct psmouse *psmouse) if (active) { input_report_abs(dev, ABS_MT_POSITION_X, finger->x); input_report_abs(dev, ABS_MT_POSITION_Y, - FOC_MAX_Y - finger->y); + priv->y_max - finger->y); } } input_mt_report_pointer_emulation(dev, true);