]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
Input: joydev - fix JSIOCSAXMAP ioctl
authorKenneth Waters <kwwaters@gmail.com>
Tue, 21 Sep 2010 07:58:23 +0000 (00:58 -0700)
committerGreg Kroah-Hartman <gregkh@suse.de>
Mon, 21 Mar 2011 19:43:14 +0000 (12:43 -0700)
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: Greg Kroah-Hartman <gregkh@suse.de>
drivers/input/joydev.c

index b1bd6dd322864d0bd04c2f9a48c9f80b3217dcce..93c60e0f2b8e6a2432f06aec1ea81da0fdd6af70 100644 (file)
@@ -481,6 +481,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;