From patchwork Fri Nov 19 23:42:57 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: =?utf-8?b?RGF2aWQgSMODwqRyZGVtYW4=?= X-Patchwork-Id: 343711 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter1.kernel.org (8.14.4/8.14.3) with ESMTP id oAJNihf6022829 for ; Fri, 19 Nov 2010 23:44:45 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757504Ab0KSXom (ORCPT ); Fri, 19 Nov 2010 18:44:42 -0500 Received: from 1-1-12-13a.han.sth.bostream.se ([82.182.30.168]:33746 "EHLO palpatine.hardeman.nu" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1757201Ab0KSXol (ORCPT ); Fri, 19 Nov 2010 18:44:41 -0500 Received: from basil.haag.hardeman.nu (host-88-217-225-61.customer.m-online.net [88.217.225.61]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by palpatine.hardeman.nu (Postfix) with ESMTPSA id 640A11A3E; Sat, 20 Nov 2010 00:44:40 +0100 (CET) Received: by basil.haag.hardeman.nu (Postfix, from userid 1000) id 0F8021A2B98; Sat, 20 Nov 2010 00:42:57 +0100 (CET) Subject: [PATCH 04/10] saa7134: merge saa7134_card_ir->timer and saa7134_card_ir->timer_end To: linux-media@vger.kernel.org From: David =?utf-8?b?SMOkcmRlbWFu?= Cc: jarod@wilsonet.com, mchehab@infradead.org Date: Sat, 20 Nov 2010 00:42:57 +0100 Message-ID: <20101119234256.3511.56046.stgit@localhost.localdomain> In-Reply-To: <20101119233959.3511.91287.stgit@localhost.localdomain> References: <20101119233959.3511.91287.stgit@localhost.localdomain> User-Agent: StGit/0.15 MIME-Version: 1.0 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 (demeter1.kernel.org [140.211.167.41]); Fri, 19 Nov 2010 23:44:45 +0000 (UTC) diff --git a/drivers/media/video/saa7134/saa7134-input.c b/drivers/media/video/saa7134/saa7134-input.c index d75c307..98678d9 100644 --- a/drivers/media/video/saa7134/saa7134-input.c +++ b/drivers/media/video/saa7134/saa7134-input.c @@ -420,11 +420,11 @@ static int __saa7134_ir_start(void *priv) if (ir->polling) { setup_timer(&ir->timer, saa7134_input_timer, (unsigned long)dev); - ir->timer.expires = jiffies + HZ; + ir->timer.expires = jiffies + HZ; add_timer(&ir->timer); } else if (ir->raw_decode) { /* set timer_end for code completion */ - setup_timer(&ir->timer_end, ir_raw_decode_timer_end, + setup_timer(&ir->timer, ir_raw_decode_timer_end, (unsigned long)dev); } @@ -443,10 +443,8 @@ static void __saa7134_ir_stop(void *priv) if (!ir->running) return; - if (ir->polling) + if (ir->polling || ir->raw_decode) del_timer_sync(&ir->timer); - else if (ir->raw_decode) - del_timer_sync(&ir->timer_end); ir->active = false; ir->running = false; @@ -923,7 +921,7 @@ static int saa7134_raw_decode_irq(struct saa7134_dev *dev) */ if (!ir->active) { timeout = jiffies + jiffies_to_msecs(15); - mod_timer(&ir->timer_end, timeout); + mod_timer(&ir->timer, timeout); ir->active = true; } diff --git a/drivers/media/video/saa7134/saa7134.h b/drivers/media/video/saa7134/saa7134.h index f93951a..babfbe7 100644 --- a/drivers/media/video/saa7134/saa7134.h +++ b/drivers/media/video/saa7134/saa7134.h @@ -134,7 +134,6 @@ struct saa7134_card_ir { bool active; struct timer_list timer; - struct timer_list timer_end; /* timer_end for code completion */ /* IR core raw decoding */ u32 raw_decode;