Re: snd-ens1371 (alsa) & joystick woes

From: Dmitry Torokhov
Date: Thu Apr 28 2005 - 22:14:01 EST


On Friday 15 April 2005 04:36, Guillaume Chazarain wrote:
> Guillaume Chazarain wrote:
>
> > From 2.6.11 to 2.6.12-rc2, there are some changes in the joystick
> > behaviour
> > that I don't think are expected. It's a simple joystick using
> > analog.ko plugged
> > on a sound board using snd-ens1371. So here we go:
>
> Reverting
> http://linux.bkbits.net:8080/linux-2.5/diffs/drivers/input/joydev.c@xxxx?nav=index.html|src/|src/drivers|src/drivers/input|hist/drivers/input/joydev.c
> (removing all the added " + 1" in joydev.c) fixes it for me.
>

Hi,

Could you check if the following patch from Vojtech fixes it?

Thanks!

--
Dmitry


===================================================================


ChangeSet@xxxxxxxxxxx, 2005-04-04 15:40:40+02:00, vojtech@xxxxxxx
input: Fix button mapping in joydev - BTN_TRIGGER was being
mapped twice, resulting in it being the last (instead
of first) button on a joystick.

Signed-off-by: Vojtech Pavlik <vojtech@xxxxxxx>


joydev.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)


===================================================================



diff -Nru a/drivers/input/joydev.c b/drivers/input/joydev.c
--- a/drivers/input/joydev.c 2005-04-28 22:07:31 -05:00
+++ b/drivers/input/joydev.c 2005-04-28 22:07:31 -05:00
@@ -357,7 +357,7 @@
}

#ifdef CONFIG_COMPAT
-static long joydev_compat_ioctl(struct file *file, unsigned cmd, unsigned long arg)
+static long joydev_compat_ioctl(struct file *file, unsigned int cmd, unsigned long arg)
{
struct joydev_list *list = file->private_data;
struct joydev *joydev = list->joydev;
@@ -488,7 +488,7 @@
joydev->nkey++;
}

- for (i = 0; i < BTN_JOYSTICK - BTN_MISC + 1; i++)
+ for (i = 0; i < BTN_JOYSTICK - BTN_MISC; i++)
if (test_bit(i + BTN_MISC, dev->keybit)) {
joydev->keymap[i] = joydev->nkey;
joydev->keypam[joydev->nkey] = i + BTN_MISC;
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/