]> git.hungrycats.org Git - linux/commitdiff
Input: joydev - fix JSIOCSAXMAP ioctl
authorKenneth Waters <kwwaters@gmail.com>
Tue, 21 Sep 2010 07:58:23 +0000 (00:58 -0700)
committerPaul Gortmaker <paul.gortmaker@windriver.com>
Thu, 6 Jan 2011 23:08:09 +0000 (18:08 -0500)
commit d2520a426dc3033c00077e923a553fc6c98c7564 upstream.

Fixed JSIOCSAXMAP ioctl to update absmap, the map from hardware axis to
event axis in addition to abspam.  This fixes a regression introduced
by 999b874f.

Signed-off-by: Kenneth Waters <kwwaters@gmail.com>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
drivers/input/joydev.c

index 423e0e6031ab5010e542555b10bc539683efaae6..03254804d3d5866b909afce177fc1f0df0868595 100644 (file)
@@ -483,6 +483,9 @@ static int joydev_handle_JSIOCSAXMAP(struct joydev *joydev,
 
        memcpy(joydev->abspam, abspam, len);
 
+       for (i = 0; i < joydev->nabs; i++)
+               joydev->absmap[joydev->abspam[i]] = i;
+
  out:
        kfree(abspam);
        return retval;