aboutsummaryrefslogtreecommitdiff
path: root/drivers/input/mousedev.c
diff options
context:
space:
mode:
authorChristoph Fritz2010-08-24 00:33:37 -0700
committerDmitry Torokhov2010-08-25 07:50:44 -0700
commit268ba5c05b82af575819bd719a2facb2a3169260 (patch)
tree8ce615e190e39bbc24e689e221a39390cc8d9fa7 /drivers/input/mousedev.c
parent8905aaafb4b5d9764c5b4b54c7d03eb41bb0a7e9 (diff)
Input: mousedev - fix regression of inverting axes
Introduced by 987a6c0298260b7aa40702b349282554d6180e4b a swap in max/min calculation gets fixed by this patch. Reported-by: Bruno Prémont <bonbons@linux-vserver.org> Signed-off-by: Christoph Fritz <chf.fritz@googlemail.com> Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
Diffstat (limited to 'drivers/input/mousedev.c')
-rw-r--r--drivers/input/mousedev.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/input/mousedev.c b/drivers/input/mousedev.c
index 83c24cca234a..d528a2dba064 100644
--- a/drivers/input/mousedev.c
+++ b/drivers/input/mousedev.c
@@ -138,8 +138,8 @@ static void mousedev_touchpad_event(struct input_dev *dev,
fx(0) = value;
if (mousedev->touch && mousedev->pkt_count >= 2) {
- size = input_abs_get_min(dev, ABS_X) -
- input_abs_get_max(dev, ABS_X);
+ size = input_abs_get_max(dev, ABS_X) -
+ input_abs_get_min(dev, ABS_X);
if (size == 0)
size = 256 * 2;
@@ -155,8 +155,8 @@ static void mousedev_touchpad_event(struct input_dev *dev,
fy(0) = value;
if (mousedev->touch && mousedev->pkt_count >= 2) {
/* use X size for ABS_Y to keep the same scale */
- size = input_abs_get_min(dev, ABS_X) -
- input_abs_get_max(dev, ABS_X);
+ size = input_abs_get_max(dev, ABS_X) -
+ input_abs_get_min(dev, ABS_X);
if (size == 0)
size = 256 * 2;