diff mbox

[2/2] HID: ntrig mapping more firmware id bits

Message ID 1298610932-21957-2-git-send-email-rafi@seas.upenn.edu (mailing list archive)
State New, archived
Delegated to: Jiri Kosina
Headers show

Commit Message

Rafi Rubin Feb. 25, 2011, 5:15 a.m. UTC
None
diff mbox

Patch

diff --git a/drivers/hid/hid-ntrig.c b/drivers/hid/hid-ntrig.c
index 616f091..3ce4624 100644
--- a/drivers/hid/hid-ntrig.c
+++ b/drivers/hid/hid-ntrig.c
@@ -96,15 +96,15 @@  struct ntrig_data {
  */
 static int ntrig_version_string(unsigned char *raw, char *buf)
 {
-	__u8 a =  (raw[1] & 0x0e) >> 1;
+	__u8 a =  (raw[1] & 0x1e) >> 1;
 	__u8 b =  (raw[0] & 0x3c) >> 2;
 	__u8 c = ((raw[0] & 0x03) << 3) | ((raw[3] & 0xe0) >> 5);
 	__u8 d = ((raw[3] & 0x07) << 3) | ((raw[2] & 0xe0) >> 5);
-	__u8 e =   raw[2] & 0x07;
+	__u8 e =   raw[2] & 0x1f;
 
 	/*
 	 * As yet unmapped bits:
-	 * 0b11000000 0b11110001 0b00011000 0b00011000
+	 * 0b11000000 0b11100001 0b00000000 0b00011000
 	 */
 
 	return sprintf(buf, "%u.%u.%u.%u.%u", a, b, c, d, e);