From patchwork Tue Aug 3 08:18:03 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: mats.randgaard@tandberg.com X-Patchwork-Id: 116699 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter.kernel.org (8.14.4/8.14.3) with ESMTP id o738JHQA019869 for ; Tue, 3 Aug 2010 08:19:17 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755342Ab0HCITJ (ORCPT ); Tue, 3 Aug 2010 04:19:09 -0400 Received: from mail179.messagelabs.com ([85.158.139.35]:22003 "HELO mail179.messagelabs.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with SMTP id S1754710Ab0HCITB (ORCPT ); Tue, 3 Aug 2010 04:19:01 -0400 X-VirusChecked: Checked X-Env-Sender: mats.randgaard@tandberg.com X-Msg-Ref: server-10.tower-179.messagelabs.com!1280823537!42160600!2 X-StarScan-Version: 6.2.4; banners=-,-,- X-Originating-IP: [62.70.2.252] Received: (qmail 22595 invoked from network); 3 Aug 2010 08:18:57 -0000 Received: from unknown (HELO OSLEXCP11.eu.tandberg.int) (62.70.2.252) by server-10.tower-179.messagelabs.com with SMTP; 3 Aug 2010 08:18:57 -0000 Received: from ultra.eu.tandberg.int ([10.47.1.15]) by OSLEXCP11.eu.tandberg.int with Microsoft SMTPSVC(6.0.3790.3959); Tue, 3 Aug 2010 10:18:56 +0200 Received: from localhost.localdomain ([10.47.3.203]) by ultra.eu.tandberg.int (8.13.1/8.13.1) with ESMTP id o738Iu7v014796; Tue, 3 Aug 2010 10:18:56 +0200 From: mats.randgaard@tandberg.com To: linux-media@vger.kernel.org Cc: sudhakar.raj@ti.com, Mats Randgaard Subject: [PATCH 1/2] TVP7002: Return V4L2_DV_INVALID if any of the errors occur. Date: Tue, 3 Aug 2010 10:18:03 +0200 Message-Id: <1280823484-21664-2-git-send-email-mats.randgaard@tandberg.com> X-Mailer: git-send-email 1.6.4.2 In-Reply-To: <1280823484-21664-1-git-send-email-mats.randgaard@tandberg.com> References: <1280823484-21664-1-git-send-email-mats.randgaard@tandberg.com> X-OriginalArrivalTime: 03 Aug 2010 08:18:56.0860 (UTC) FILETIME=[8496D1C0:01CB32E4] 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, 03 Aug 2010 08:19:17 +0000 (UTC) diff --git a/drivers/media/video/tvp7002.c b/drivers/media/video/tvp7002.c index 48f5c76..8116cd4 100644 --- a/drivers/media/video/tvp7002.c +++ b/drivers/media/video/tvp7002.c @@ -796,6 +796,9 @@ static int tvp7002_query_dv_preset(struct v4l2_subdev *sd, u8 cpl_msb; int index; + /* Return invalid preset if no active input is detected */ + qpreset->preset = V4L2_DV_INVALID; + device = to_tvp7002(sd); /* Read standards from device registers */ @@ -829,8 +832,6 @@ static int tvp7002_query_dv_preset(struct v4l2_subdev *sd, if (index == NUM_PRESETS) { v4l2_dbg(1, debug, sd, "detection failed: lpf = %x, cpl = %x\n", lpfr, cpln); - /* Could not detect a signal, so return the 'invalid' preset */ - qpreset->preset = V4L2_DV_INVALID; return 0; }