diff mbox

[v2] IR/imon: remove dead IMON_KEY_RELEASE_OFFSET

Message ID 20100504191705.GB10813@redhat.com (mailing list archive)
State Accepted
Headers show

Commit Message

Jarod Wilson May 4, 2010, 7:17 p.m. UTC
None
diff mbox

Patch

diff --git a/drivers/media/IR/imon.c b/drivers/media/IR/imon.c
index 27743eb..efe219a 100644
--- a/drivers/media/IR/imon.c
+++ b/drivers/media/IR/imon.c
@@ -55,7 +55,6 @@ 
 #define BIT_DURATION	250	/* each bit received is 250us */
 
 #define IMON_CLOCK_ENABLE_PACKETS	2
-#define IMON_KEY_RELEASE_OFFSET		1000
 
 /*** P R O T O T Y P E S ***/
 
@@ -1199,13 +1198,14 @@  static u32 imon_panel_key_lookup(u64 hw_code)
 {
 	int i;
 	u64 code = be64_to_cpu(hw_code);
-	u32 keycode;
+	u32 keycode = KEY_RESERVED;
 
-	for (i = 0; i < ARRAY_SIZE(imon_panel_key_table); i++)
-		if (imon_panel_key_table[i].hw_code == (code | 0xffee))
+	for (i = 0; i < ARRAY_SIZE(imon_panel_key_table); i++) {
+		if (imon_panel_key_table[i].hw_code == (code | 0xffee)) {
+			keycode = imon_panel_key_table[i].keycode;
 			break;
-
-	keycode = imon_panel_key_table[i % IMON_KEY_RELEASE_OFFSET].keycode;
+		}
+	}
 
 	return keycode;
 }