aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/input
diff options
context:
space:
mode:
authorBenjamin Tissoires <benjamin.tissoires@redhat.com>2014-06-07 22:37:47 -0700
committerBen Hutchings <ben@decadent.org.uk>2014-07-11 13:33:48 +0100
commit19475c82c49aa1e527f20b8918b858960d5e9dac (patch)
tree5077ab726e4086131441a7599f924cc4b356e8e6 /drivers/input
parentcb70ede3576b9bfc634d52b93940b1e2db6a6c18 (diff)
downloadkernel_samsung_smdk4412-19475c82c49aa1e527f20b8918b858960d5e9dac.zip
kernel_samsung_smdk4412-19475c82c49aa1e527f20b8918b858960d5e9dac.tar.gz
kernel_samsung_smdk4412-19475c82c49aa1e527f20b8918b858960d5e9dac.tar.bz2
Input: synaptics - fix resolution for manually provided min/max
commit d49cb7aeebb974713f9f7ab2991352d3050b095b upstream. commit 421e08c41fda fixed the reported min/max for the X and Y axis, but unfortunately, it broke the resolution of those same axis. On the t540p, the resolution is the same regarding X and Y. It is not a problem for xf86-input-synaptics because this driver is only interested in the ratio between X and Y. Unfortunately, xf86-input-cmt uses directly the resolution, and having a null resolution leads to some divide by 0 errors, which are translated by -infinity in the resulting coordinates. Reported-by: Peter Hutterer <peter.hutterer@who-t.net> Signed-off-by: Benjamin Tissoires <benjamin.tissoires@redhat.com> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com> [bwh: Backported to 3.2: I didn't apply the PNP ID changes, so the code being moved looks different] Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
Diffstat (limited to 'drivers/input')
-rw-r--r--drivers/input/mouse/synaptics.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/drivers/input/mouse/synaptics.c b/drivers/input/mouse/synaptics.c
index d2ce1b4..df8b72b 100644
--- a/drivers/input/mouse/synaptics.c
+++ b/drivers/input/mouse/synaptics.c
@@ -245,14 +245,6 @@ static int synaptics_resolution(struct psmouse *psmouse)
struct synaptics_data *priv = psmouse->private;
unsigned char resp[3];
- if (quirk_min_max) {
- priv->x_min = quirk_min_max[0];
- priv->x_max = quirk_min_max[1];
- priv->y_min = quirk_min_max[2];
- priv->y_max = quirk_min_max[3];
- return 0;
- }
-
if (SYN_ID_MAJOR(priv->identity) < 4)
return 0;
@@ -263,6 +255,14 @@ static int synaptics_resolution(struct psmouse *psmouse)
}
}
+ if (quirk_min_max) {
+ priv->x_min = quirk_min_max[0];
+ priv->x_max = quirk_min_max[1];
+ priv->y_min = quirk_min_max[2];
+ priv->y_max = quirk_min_max[3];
+ return 0;
+ }
+
if (SYN_EXT_CAP_REQUESTS(priv->capabilities) >= 5 &&
SYN_CAP_MAX_DIMENSIONS(priv->ext_cap_0c)) {
if (synaptics_send_cmd(psmouse, SYN_QUE_EXT_MAX_COORDS, resp)) {