Skip to contentSkip to conversation

input: joydev: Fix JSIOCSAXMAP ioctl.

PATCH Applied Kenneth Waters 2 participants 2 messages Sep 21, 2010

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 input: joydev: Fix JSIOCSAXMAP ioctl.

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.

---
 drivers/input/joydev.c |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)
drivers/input/joydev.c +3 -0
index d85bd8a..22239e9 100644
@@ -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;
Signature · 1 line
1.7.2.2
maintainer Applied
#1 lore raw
Quoted 5 lines · Kenneth Waters

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.

Applied, thank you Kenneth.

Quoted 21 lines
---
 drivers/input/joydev.c |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)
drivers/input/joydev.c +3 -0
index d85bd8a..22239e9 100644
@@ -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;
Signature · 1 line
1.7.2.2
Signature · 1 line
Dmitry