From: Vojtech Pavlik Date: Sat, 28 May 2005 07:11:49 +0000 (-0500) Subject: Input: Fix button mapping in joydev - BTN_TRIGGER was being X-Git-Tag: v2.6.12-rc6~92^2~5 X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=f24949e8e0b9bed223ad9a435bf37e91ee8d0db7;p=linux-2.6 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 Signed-off-by: Dmitry Torokhov --- diff --git a/drivers/input/joydev.c b/drivers/input/joydev.c index 7d7527f8b0..627d343dfb 100644 --- a/drivers/input/joydev.c +++ b/drivers/input/joydev.c @@ -422,7 +422,7 @@ static struct input_handle *joydev_connect(struct input_handler *handler, struct 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;