From patchwork Thu Feb 7 16:21:06 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: =?utf-8?q?Michael_B=C3=BCsch?= X-Patchwork-Id: 2112151 Return-Path: X-Original-To: patchwork-linux-media@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 237503FCD5 for ; Thu, 7 Feb 2013 17:06:57 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1758918Ab3BGRFm (ORCPT ); Thu, 7 Feb 2013 12:05:42 -0500 Received: from bues.ch ([80.190.117.144]:33773 "EHLO bues.ch" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1757499Ab3BGRFl (ORCPT ); Thu, 7 Feb 2013 12:05:41 -0500 X-Greylist: delayed 2591 seconds by postgrey-1.27 at vger.kernel.org; Thu, 07 Feb 2013 12:05:41 EST Received: by bues.ch with esmtpsa (Exim 4.72) (envelope-from ) id 1U3UF7-0006Uj-9S; Thu, 07 Feb 2013 17:22:33 +0100 Date: Thu, 7 Feb 2013 17:21:06 +0100 From: Michael =?UTF-8?B?QsO8c2No?= To: Mauro Carvalho Chehab Cc: linux-media Subject: [PATCH 4/4] fc0011: Return early, if the frequency is already tuned Message-ID: <20130207172106.1c8f4dd7@milhouse> X-Mailer: Claws Mail 3.8.1 (GTK+ 2.24.10; x86_64-pc-linux-gnu) Mime-Version: 1.0 Sender: linux-media-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org Return early, if we already tuned to a frequency. Signed-off-by: Michael Buesch Index: linux/drivers/media/tuners/fc0011.c =================================================================== --- linux.orig/drivers/media/tuners/fc0011.c 2013-01-01 23:25:40.000000000 +0100 +++ linux/drivers/media/tuners/fc0011.c 2013-01-01 23:27:44.985089712 +0100 @@ -187,6 +187,9 @@ u8 fa, fp, vco_sel, vco_cal; u8 regs[FC11_NR_REGS] = { }; + if (priv->frequency == p->frequency) + return 0; + regs[FC11_REG_7] = 0x0F; regs[FC11_REG_8] = 0x3E; regs[FC11_REG_10] = 0xB8;