Skip to content

Commit

Permalink
Input: mousedev - fix regression of inverting axes
Browse files Browse the repository at this point in the history
Introduced by 987a6c0 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>
  • Loading branch information
Christoph Fritz authored and Dmitry Torokhov committed Aug 25, 2010
1 parent 8905aaa commit 268ba5c
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions drivers/input/mousedev.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand All @@ -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;

Expand Down

0 comments on commit 268ba5c

Please sign in to comment.