public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Vojtech Pavlik <vojtech@suse.cz>
To: torvalds@osdl.org, vojtech@ucw.cz, linux-kernel@vger.kernel.org
Subject: [PATCH 4/4] Fix HID LED mapping.
Date: Wed, 2 Feb 2005 20:46:54 +0100	[thread overview]
Message-ID: <11073736142817@twilight.ucw.cz> (raw)
In-Reply-To: <11073736133786@twilight.ucw.cz>

You can pull this changeset from:
	bk://kernel.bkbits.net/vojtech/for-linus

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

ChangeSet@1.1994, 2005-02-02 17:54:35+01:00, vojtech@silver.ucw.cz
  input: Fix HID LED mapping. LEDs were ignored because the usage
         value contains the page code in high 16 bits.
  
  Signed-off-by: Vojtech Pavlik <vojtech@suse.cz>


 hid-debug.h |    2 +-
 hid-input.c |    4 ++--
 2 files changed, 3 insertions(+), 3 deletions(-)

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

diff -Nru a/drivers/usb/input/hid-debug.h b/drivers/usb/input/hid-debug.h
--- a/drivers/usb/input/hid-debug.h	2005-02-02 20:29:32 +01:00
+++ b/drivers/usb/input/hid-debug.h	2005-02-02 20:29:32 +01:00
@@ -86,12 +86,12 @@
       {0, 0x92, "D-PadRight"},
       {0, 0x93, "D-PadLeft"},
   {  7, 0, "Keyboard" },
+  {  8, 0, "LED" },
       {0, 0x01, "NumLock"},
       {0, 0x02, "CapsLock"},
       {0, 0x03, "ScrollLock"},
       {0, 0x04, "Compose"},
       {0, 0x05, "Kana"},
-  {  8, 0, "LED" },
   {  9, 0, "Button" },
   { 10, 0, "Ordinal" },
   { 12, 0, "Consumer" },
diff -Nru a/drivers/usb/input/hid-input.c b/drivers/usb/input/hid-input.c
--- a/drivers/usb/input/hid-input.c	2005-02-02 20:29:32 +01:00
+++ b/drivers/usb/input/hid-input.c	2005-02-02 20:29:32 +01:00
@@ -185,9 +185,9 @@
 			break;
 
 		case HID_UP_LED:
-			if (usage->hid - 1 >= LED_MAX)
+			if (((usage->hid - 1) & 0xffff) >= LED_MAX)
 				goto ignore;
-			map_led(usage->hid - 1);
+			map_led((usage->hid - 1) & 0xffff);
 			break;
 
 		case HID_UP_DIGITIZER:


      reply	other threads:[~2005-02-02 20:19 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-02-02 19:46 [bk-patches] [resend] Needed input fixes for 2.6.11 Vojtech Pavlik
2005-02-02 19:46 ` [PATCH 1/4] Fix MUX mode disabling Vojtech Pavlik
2005-02-02 19:46   ` [PATCH 2/4] Document the atkbd.softraw module parameter Vojtech Pavlik
2005-02-02 19:46     ` [PATCH 3/4] Ignore non-LED events in hid-input hidinput_event() Vojtech Pavlik
2005-02-02 19:46       ` Vojtech Pavlik [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=11073736142817@twilight.ucw.cz \
    --to=vojtech@suse.cz \
    --cc=linux-kernel@vger.kernel.org \
    --cc=torvalds@osdl.org \
    --cc=vojtech@ucw.cz \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox