LKML Archive mirror
 help / color / mirror / Atom feed
* [PATCH] input: joydev: Fix JSIOCSAXMAP ioctl.
@ 2010-09-21  6:51 Kenneth Waters
  2010-09-21  8:03 ` Dmitry Torokhov
  0 siblings, 1 reply; 2+ messages in thread
From: Kenneth Waters @ 2010-09-21  6:51 UTC (permalink / raw
  To: dmitry.torokhov; +Cc: steve, linux-input, linux-kernel, 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.

Signed-off-by: Kenneth Waters <kwwaters@gmail.com>
---
 drivers/input/joydev.c |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)

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;
-- 
1.7.2.2


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] input: joydev: Fix JSIOCSAXMAP ioctl.
  2010-09-21  6:51 [PATCH] input: joydev: Fix JSIOCSAXMAP ioctl Kenneth Waters
@ 2010-09-21  8:03 ` Dmitry Torokhov
  0 siblings, 0 replies; 2+ messages in thread
From: Dmitry Torokhov @ 2010-09-21  8:03 UTC (permalink / raw
  To: Kenneth Waters; +Cc: steve, linux-input, linux-kernel

On Mon, Sep 20, 2010 at 11:51:25PM -0700, Kenneth Waters wrote:
> 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>

Applied, thank you Kenneth.

> ---
>  drivers/input/joydev.c |    3 +++
>  1 files changed, 3 insertions(+), 0 deletions(-)
> 
> 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;
> -- 
> 1.7.2.2
> 

-- 
Dmitry

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2010-09-21  8:03 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-09-21  6:51 [PATCH] input: joydev: Fix JSIOCSAXMAP ioctl Kenneth Waters
2010-09-21  8:03 ` Dmitry Torokhov

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).