From patchwork Tue May 4 19:17:05 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jarod Wilson X-Patchwork-Id: 96854 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter.kernel.org (8.14.3/8.14.3) with ESMTP id o44JHWX9024344 for ; Tue, 4 May 2010 19:17:32 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933623Ab0EDTRR (ORCPT ); Tue, 4 May 2010 15:17:17 -0400 Received: from mx1.redhat.com ([209.132.183.28]:62309 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933624Ab0EDTRQ (ORCPT ); Tue, 4 May 2010 15:17:16 -0400 Received: from int-mx02.intmail.prod.int.phx2.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) by mx1.redhat.com (8.13.8/8.13.8) with ESMTP id o44JHECZ028371 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Tue, 4 May 2010 15:17:14 -0400 Received: from xavier.bos.redhat.com (xavier.bos.redhat.com [10.16.16.50]) by int-mx02.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id o44JHEGO032700; Tue, 4 May 2010 15:17:14 -0400 Received: by xavier.bos.redhat.com (Postfix, from userid 501) id 84E982D552; Tue, 4 May 2010 15:17:05 -0400 (EDT) Date: Tue, 4 May 2010 15:17:05 -0400 From: Jarod Wilson To: Dan Carpenter Cc: linux-media@vger.kernel.org Subject: [PATCH v2] IR/imon: remove dead IMON_KEY_RELEASE_OFFSET Message-ID: <20100504191705.GB10813@redhat.com> References: <20100504122030.GX29093@bicker> <20100504140318.GA10813@redhat.com> <20100504160641.GZ29093@bicker> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20100504160641.GZ29093@bicker> User-Agent: Mutt/1.5.20 (2009-08-17) X-Scanned-By: MIMEDefang 2.67 on 10.5.11.12 Sender: linux-media-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.3 (demeter.kernel.org [140.211.167.41]); Tue, 04 May 2010 19:17:32 +0000 (UTC) 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; }