From patchwork Tue Sep 18 10:53:07 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hans Verkuil X-Patchwork-Id: 1528051 Return-Path: X-Original-To: patchwork-davinci@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork1.kernel.org Received: from arroyo.ext.ti.com (arroyo.ext.ti.com [192.94.94.40]) by patchwork1.kernel.org (Postfix) with ESMTP id 9D9223FE80 for ; Sat, 29 Sep 2012 06:52:56 +0000 (UTC) Received: from dlelxv30.itg.ti.com ([172.17.2.17]) by arroyo.ext.ti.com (8.13.7/8.13.7) with ESMTP id q8T6pcxj010153; Sat, 29 Sep 2012 01:51:38 -0500 Received: from DLEE74.ent.ti.com (dlee74.ent.ti.com [157.170.170.8]) by dlelxv30.itg.ti.com (8.13.8/8.13.8) with ESMTP id q8T6pcLK011294; Sat, 29 Sep 2012 01:51:38 -0500 Received: from dlelxv24.itg.ti.com (172.17.1.199) by DLEE74.ent.ti.com (157.170.170.8) with Microsoft SMTP Server id 14.1.323.3; Sat, 29 Sep 2012 01:51:37 -0500 Received: from linux.omap.com (dlelxs01.itg.ti.com [157.170.227.31]) by dlelxv24.itg.ti.com (8.13.8/8.13.8) with ESMTP id q8T6pciC010537; Sat, 29 Sep 2012 01:51:38 -0500 Received: from linux.omap.com (localhost [127.0.0.1]) by linux.omap.com (Postfix) with ESMTP id 06A098062E; Sat, 29 Sep 2012 01:51:38 -0500 (CDT) X-Original-To: davinci-linux-open-source@linux.davincidsp.com Delivered-To: davinci-linux-open-source@linux.davincidsp.com Received: from dflp51.itg.ti.com (dflp51.itg.ti.com [128.247.22.94]) by linux.omap.com (Postfix) with ESMTP id 51AE880628 for ; Tue, 18 Sep 2012 05:53:32 -0500 (CDT) Received: from neches.ext.ti.com (neches.ext.ti.com [192.91.81.29]) by dflp51.itg.ti.com (8.13.7/8.13.8) with ESMTP id q8IArWLb010255 for ; Tue, 18 Sep 2012 05:53:32 -0500 (CDT) Received: from psmtp.com (na3sys009amx160.postini.com [74.125.149.86]) by neches.ext.ti.com (8.13.7/8.13.7) with SMTP id q8IArTev016802 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for ; Tue, 18 Sep 2012 05:53:30 -0500 Received: from ams-iport-1.cisco.com ([144.254.224.140]) (using TLSv1) by na3sys009amx160.postini.com ([74.125.148.10]) with SMTP; Tue, 18 Sep 2012 10:53:30 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=cisco.com; i=@cisco.com; l=3553; q=dns/txt; s=iport; t=1347965610; x=1349175210; h=from:to:cc:subject:date:message-id; bh=dpdND9/5CfwdDr27BSQ0md6x9MsaQYZqi5s9Q8egqrE=; b=koQ12GjWYlgc3bJwCc2+PxjAsTtVp9nHmaXkm92j1rOXnPtVsKX6sRq1 +3j/OI6i1jow0irphJzuzBAfrOmrjG8L1744x7tYMVCVCT2bSD9+g32lC xfjB1p+zCAn1CPplkdMWQ+QiZYor/4Fi3U8o1FuWyvj61iH7nCvo+Z6hS E=; X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: Av0EADZSWFCQ/khR/2dsb2JhbABFvDOBB4IhAQEEEgEUUhBRVxkih16aIqAzkgkDlWKJNYUDgWmCaA X-IronPort-AV: E=Sophos;i="4.80,442,1344211200"; d="scan'208";a="143977011" Received: from ams-core-1.cisco.com ([144.254.72.81]) by ams-iport-1.cisco.com with ESMTP; 18 Sep 2012 10:53:28 +0000 Received: from cobaltpc1.cisco.com (dhcp-10-54-92-107.cisco.com [10.54.92.107]) by ams-core-1.cisco.com (8.14.5/8.14.5) with ESMTP id q8IArQ4T012350; Tue, 18 Sep 2012 10:53:27 GMT From: Hans Verkuil To: Subject: [RFCv1 PATCH 05/11] vpif_capture: remove unnecessary can_route flag. Date: Tue, 18 Sep 2012 12:53:07 +0200 Message-ID: X-Mailer: git-send-email 1.7.10.4 In-Reply-To: References: X-pstn-levels: (S:91.02342/99.90000 CV:99.9000 FC:95.5390 LC:95.5390 R:95.9108 P:95.9108 M:97.0282 C:98.6951 ) X-pstn-dkim: 1 skipped:not-enabled X-pstn-settings: 2 (0.5000:0.0003) s cv gt3 GT2 gt1 r p m c X-pstn-addresses: from [82/3] X-Mailman-Approved-At: Sat, 29 Sep 2012 01:48:44 -0500 CC: DLOS X-BeenThere: davinci-linux-open-source@linux.davincidsp.com X-Mailman-Version: 2.1.12 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: Errors-To: davinci-linux-open-source-bounces@linux.davincidsp.com Calling a subdev op that isn't implemented will just return -ENOIOCTLCMD No need to have a flag for that. Signed-off-by: Hans Verkuil --- arch/arm/mach-davinci/board-da850-evm.c | 2 -- arch/arm/mach-davinci/board-dm646x-evm.c | 2 -- drivers/media/video/davinci/vpif_capture.c | 18 ++++++++---------- include/media/davinci/vpif_types.h | 1 - 4 files changed, 8 insertions(+), 15 deletions(-) diff --git a/arch/arm/mach-davinci/board-da850-evm.c b/arch/arm/mach-davinci/board-da850-evm.c index d0954a2..d92e0ab 100644 --- a/arch/arm/mach-davinci/board-da850-evm.c +++ b/arch/arm/mach-davinci/board-da850-evm.c @@ -1209,7 +1209,6 @@ static struct vpif_subdev_info da850_vpif_capture_sdev_info[] = { }, .input = INPUT_CVBS_VI2B, .output = OUTPUT_10BIT_422_EMBEDDED_SYNC, - .can_route = 1, .vpif_if = { .if_type = VPIF_IF_BT656, .hd_pol = 1, @@ -1225,7 +1224,6 @@ static struct vpif_subdev_info da850_vpif_capture_sdev_info[] = { }, .input = INPUT_SVIDEO_VI2C_VI1C, .output = OUTPUT_10BIT_422_EMBEDDED_SYNC, - .can_route = 1, .vpif_if = { .if_type = VPIF_IF_BT656, .hd_pol = 1, diff --git a/arch/arm/mach-davinci/board-dm646x-evm.c b/arch/arm/mach-davinci/board-dm646x-evm.c index 958679a..a0be63b 100644 --- a/arch/arm/mach-davinci/board-dm646x-evm.c +++ b/arch/arm/mach-davinci/board-dm646x-evm.c @@ -603,7 +603,6 @@ static struct vpif_subdev_info vpif_capture_sdev_info[] = { }, .input = INPUT_CVBS_VI2B, .output = OUTPUT_10BIT_422_EMBEDDED_SYNC, - .can_route = 1, .vpif_if = { .if_type = VPIF_IF_BT656, .hd_pol = 1, @@ -619,7 +618,6 @@ static struct vpif_subdev_info vpif_capture_sdev_info[] = { }, .input = INPUT_SVIDEO_VI2C_VI1C, .output = OUTPUT_10BIT_422_EMBEDDED_SYNC, - .can_route = 1, .vpif_if = { .if_type = VPIF_IF_BT656, .hd_pol = 1, diff --git a/drivers/media/video/davinci/vpif_capture.c b/drivers/media/video/davinci/vpif_capture.c index eec687c..ae5cabf 100644 --- a/drivers/media/video/davinci/vpif_capture.c +++ b/drivers/media/video/davinci/vpif_capture.c @@ -1487,15 +1487,13 @@ static int vpif_s_input(struct file *file, void *priv, unsigned int index) } } - if (subdev_info->can_route) { - input = subdev_info->input; - output = subdev_info->output; - ret = v4l2_subdev_call(vpif_obj.sd[sd_index], video, s_routing, - input, output, 0); - if (ret < 0) { - vpif_dbg(1, debug, "Failed to set input\n"); - return ret; - } + input = subdev_info->input; + output = subdev_info->output; + ret = v4l2_subdev_call(vpif_obj.sd[sd_index], video, s_routing, + input, output, 0); + if (ret < 0 && ret != -ENOIOCTLCMD) { + vpif_dbg(1, debug, "Failed to set input\n"); + return ret; } ch->input_idx = index; ch->curr_subdev_info = subdev_info; @@ -1505,7 +1503,7 @@ static int vpif_s_input(struct file *file, void *priv, unsigned int index) /* update tvnorms from the sub device input info */ ch->video_dev->tvnorms = chan_cfg->inputs[index].input.std; - return ret; + return 0; } /** diff --git a/include/media/davinci/vpif_types.h b/include/media/davinci/vpif_types.h index d8f6ab1..1fe46a5 100644 --- a/include/media/davinci/vpif_types.h +++ b/include/media/davinci/vpif_types.h @@ -39,7 +39,6 @@ struct vpif_subdev_info { struct i2c_board_info board_info; u32 input; u32 output; - unsigned can_route:1; struct vpif_interface vpif_if; };