From patchwork Fri Aug 24 15:09:46 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Timo Kokkonen X-Patchwork-Id: 1371781 Return-Path: X-Original-To: patchwork-linux-omap@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork1.kernel.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by patchwork1.kernel.org (Postfix) with ESMTP id 121D23FC33 for ; Fri, 24 Aug 2012 15:10:26 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756513Ab2HXPKI (ORCPT ); Fri, 24 Aug 2012 11:10:08 -0400 Received: from mta-out.inet.fi ([195.156.147.13]:59034 "EHLO jenni1.inet.fi" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756049Ab2HXPJv (ORCPT ); Fri, 24 Aug 2012 11:09:51 -0400 Received: from itanic.dhcp.inet.fi (80.223.243.31) by jenni1.inet.fi (8.5.140.03) id 502AD34B00899EEF; Fri, 24 Aug 2012 18:09:50 +0300 From: Timo Kokkonen To: linux-omap@vger.kernel.org, linux-media@vger.kernel.org Subject: [PATCHv2 8/8] ir-rx51: Remove useless variable from struct lirc_rx51 Date: Fri, 24 Aug 2012 18:09:46 +0300 Message-Id: <1345820986-4597-9-git-send-email-timo.t.kokkonen@iki.fi> X-Mailer: git-send-email 1.7.12 In-Reply-To: <1345820986-4597-1-git-send-email-timo.t.kokkonen@iki.fi> References: <1345820986-4597-1-git-send-email-timo.t.kokkonen@iki.fi> Sender: linux-omap-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-omap@vger.kernel.org As clearly visible from the patch, this variable has no useful purpose what so ever. Thus, it can be removed altogether without any side effects. Signed-off-by: Timo Kokkonen --- drivers/media/rc/ir-rx51.c | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/drivers/media/rc/ir-rx51.c b/drivers/media/rc/ir-rx51.c index 008cdab..179b64d 100644 --- a/drivers/media/rc/ir-rx51.c +++ b/drivers/media/rc/ir-rx51.c @@ -57,7 +57,6 @@ struct lirc_rx51 { unsigned int freq; /* carrier frequency */ unsigned int duty_cycle; /* carrier duty cycle */ unsigned int irq_num; - unsigned int match; int wbuf[WBUF_LEN]; int wbuf_index; unsigned long device_is_open; @@ -102,8 +101,6 @@ static int init_timing_params(struct lirc_rx51 *lirc_rx51) omap_dm_timer_set_int_enable(lirc_rx51->pulse_timer, 0); omap_dm_timer_start(lirc_rx51->pulse_timer); - lirc_rx51->match = 0; - return 0; } @@ -113,11 +110,7 @@ static int pulse_timer_set_timeout(struct lirc_rx51 *lirc_rx51, int usec) BUG_ON(usec < 0); - if (lirc_rx51->match == 0) - counter = omap_dm_timer_read_counter(lirc_rx51->pulse_timer); - else - counter = lirc_rx51->match; - + counter = omap_dm_timer_read_counter(lirc_rx51->pulse_timer); counter += (u32)(lirc_rx51->fclk_khz * usec / (1000)); omap_dm_timer_set_match(lirc_rx51->pulse_timer, 1, counter); omap_dm_timer_set_int_enable(lirc_rx51->pulse_timer,