From patchwork Sun Apr 11 03:20:00 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mauro Carvalho Chehab X-Patchwork-Id: 91880 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 o3B3KVMD005811 for ; Sun, 11 Apr 2010 03:20:32 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751181Ab0DKDUO (ORCPT ); Sat, 10 Apr 2010 23:20:14 -0400 Received: from mx1.redhat.com ([209.132.183.28]:57775 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751065Ab0DKDUN (ORCPT ); Sat, 10 Apr 2010 23:20:13 -0400 Received: from int-mx01.intmail.prod.int.phx2.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) by mx1.redhat.com (8.13.8/8.13.8) with ESMTP id o3B3KC16027757 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Sat, 10 Apr 2010 23:20:12 -0400 Received: from pedra (vpn-11-4.rdu.redhat.com [10.11.11.4]) by int-mx01.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id o3B3K4Au028100 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Sat, 10 Apr 2010 23:20:10 -0400 Date: Sun, 11 Apr 2010 00:20:00 -0300 From: Mauro Carvalho Chehab To: linux-input@vger.kernel.org, Linux Media Mailing List Subject: [PATCH 2/2] ir-core: Fix the delete logic Message-ID: <20100411002000.0ba27cdd@pedra> In-Reply-To: References: Mime-Version: 1.0 X-Scanned-By: MIMEDefang 2.67 on 10.5.11.11 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]); Sun, 11 Apr 2010 03:20:32 +0000 (UTC) diff --git a/drivers/media/IR/ir-keytable.c b/drivers/media/IR/ir-keytable.c index 01bddc4..f0eb680 100644 --- a/drivers/media/IR/ir-keytable.c +++ b/drivers/media/IR/ir-keytable.c @@ -126,7 +126,7 @@ static int ir_do_setkeycode(struct input_dev *dev, break; } - if (old_keycode == KEY_RESERVED) { + if (old_keycode == KEY_RESERVED && keycode != KEY_RESERVED) { /* No previous mapping found, we might need to grow the table */ if (ir_resize_table(rc_tab)) return -ENOMEM;