diff mbox

input: joydev: Fix JSIOCSAXMAP ioctl.

Message ID 1285051885-20417-1-git-send-email-kwwaters@gmail.com (mailing list archive)
State Accepted
Commit d2520a426dc3033c00077e923a553fc6c98c7564
Headers show

Commit Message

Kenneth Waters Sept. 21, 2010, 6:51 a.m. UTC
None
diff mbox

Patch

diff --git a/drivers/input/joydev.c b/drivers/input/joydev.c
index d85bd8a..22239e9 100644
--- a/drivers/input/joydev.c
+++ b/drivers/input/joydev.c
@@ -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;