Received: by 2002:a25:c593:0:0:0:0:0 with SMTP id v141csp5973573ybe; Tue, 10 Sep 2019 11:33:59 -0700 (PDT) X-Google-Smtp-Source: APXvYqz3Zjh/4mvLvwgnAqzzHp0THouEP9v7TsbhfQUikuxE8emmHbR6XDD1uyewTFvl5iMJYYSU X-Received: by 2002:a17:906:4890:: with SMTP id v16mr26558145ejq.3.1568140439495; Tue, 10 Sep 2019 11:33:59 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1568140439; cv=none; d=google.com; s=arc-20160816; b=1Hg4WQHX3J2r7v8EavIzF1NlWnwcYSZT9UNaO3Bx19FzO7sDpj1VlD5tOpq3S2pNwS CRXr5tGx8hbMq/KaAWy9F3VMS558nUzCO30ynxSNM33vaC9++JZeErBG8vGFlsJBa9L0 wrShrQH6Pma2AOt9NExZAzIPKeqn+kfLptLv0JockQx3M97wTvu63M6J6sncI0Gh88s1 dccNJrE9hcm9W8e7/CLMtM9ekJ6JT74rcmwwn5s6CF2UJaCpDLdAiegeYYoeaYiXSwVz CAI0I/IJlsgFR6hX+i7Cfh8LxsUGtKDL3t4XJGmujeg4d87m2joBEWEu2XEsNZNlwjE6 8dOw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:dkim-signature; bh=jy9DLYE39VYve/5VKXD9KjcBPzY+Zm3GGDueqh26Dss=; b=ci7sOzwQaYT2II5M50jpOhTLdDExuf/6bobbWksHD+myToRrNQpHFcKtQWC5ccm43c xY3AFwfD1YUDraij34lR5o8RFoqHBFxXdWLD6/icfTr8tzljzjK44waVaLHu0hEc4aye YLQ3sgCzVZDUV5J9iGn1IlNLj/96obY3ksnTxQxYra4U1aQJ/37jSRPutFzsp3419NUi Qxm+ueopgzwBw4DHkCIDn7eJgKo/hwm7kAPGe7Ch2HMfd5m/E1TblmZDtPWIqDeUNPON U2qzx+ux84VZ1w3kPVxpY47yeMdbH5WZO8aLe08b4c1fqVD08tsmxzdRJwtFPlnVavgu XmmQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b="E/Mxr+Hh"; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=NONE dis=NONE) header.from=ti.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id t16si9881274ejs.236.2019.09.10.11.33.27; Tue, 10 Sep 2019 11:33:59 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b="E/Mxr+Hh"; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=NONE dis=NONE) header.from=ti.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2389854AbfIIQ0J (ORCPT + 99 others); Mon, 9 Sep 2019 12:26:09 -0400 Received: from fllv0016.ext.ti.com ([198.47.19.142]:55412 "EHLO fllv0016.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2389739AbfIIQ0G (ORCPT ); Mon, 9 Sep 2019 12:26:06 -0400 Received: from lelv0266.itg.ti.com ([10.180.67.225]) by fllv0016.ext.ti.com (8.15.2/8.15.2) with ESMTP id x89GQ5Xe045145; Mon, 9 Sep 2019 11:26:05 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1568046365; bh=jy9DLYE39VYve/5VKXD9KjcBPzY+Zm3GGDueqh26Dss=; h=From:To:CC:Subject:Date:In-Reply-To:References; b=E/Mxr+HhgdoDxv8Awmez8KG2HVjbqrXmO4ETxz8OqF6lui95tF3eTAUfG5zSLope8 59xqQVSbEr48yzbI/QlhRmxLk8duZp07G0TEgQXAxugxudCjKJ7ICOJXtyCPr88s4e 3DGNdlecGPPmqhZm7ifRQVw9c6zvTRzmAo7cij3I= Received: from DFLE114.ent.ti.com (dfle114.ent.ti.com [10.64.6.35]) by lelv0266.itg.ti.com (8.15.2/8.15.2) with ESMTPS id x89GQ51d090214 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=FAIL); Mon, 9 Sep 2019 11:26:05 -0500 Received: from DFLE103.ent.ti.com (10.64.6.24) by DFLE114.ent.ti.com (10.64.6.35) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1713.5; Mon, 9 Sep 2019 11:26:05 -0500 Received: from lelv0326.itg.ti.com (10.180.67.84) by DFLE103.ent.ti.com (10.64.6.24) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1713.5 via Frontend Transport; Mon, 9 Sep 2019 11:26:05 -0500 Received: from uda0869644b.dal.design.ti.com (ileax41-snat.itg.ti.com [10.172.224.153]) by lelv0326.itg.ti.com (8.15.2/8.15.2) with ESMTP id x89GPnoU056522; Mon, 9 Sep 2019 11:26:05 -0500 From: Benoit Parrot To: Hans Verkuil CC: Prabhakar Lad , , , , Benoit Parrot Subject: [Patch 06/13] media: am437x-vpfe: Setting STD to current value is not an error Date: Mon, 9 Sep 2019 11:27:36 -0500 Message-ID: <20190909162743.30114-7-bparrot@ti.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20190909162743.30114-1-bparrot@ti.com> References: <20190909162743.30114-1-bparrot@ti.com> MIME-Version: 1.0 Content-Type: text/plain X-EXCLAIMER-MD-CONFIG: e1e8a2fd-e40a-4ac6-ac9b-f7e9cc9ee180 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org VIDIOC_S_STD should not return an error if the value is identical to the current one. This error was highlighted by the v4l2-compliance test. Signed-off-by: Benoit Parrot --- drivers/media/platform/am437x/am437x-vpfe.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/drivers/media/platform/am437x/am437x-vpfe.c b/drivers/media/platform/am437x/am437x-vpfe.c index 52f7fc6e11dd..ac759c066d00 100644 --- a/drivers/media/platform/am437x/am437x-vpfe.c +++ b/drivers/media/platform/am437x/am437x-vpfe.c @@ -1822,6 +1822,10 @@ static int vpfe_s_std(struct file *file, void *priv, v4l2_std_id std_id) if (!(sdinfo->inputs[0].capabilities & V4L2_IN_CAP_STD)) return -ENODATA; + /* if trying to set the same std then nothing to do */ + if (vpfe_standards[vpfe->std_index].std_id == std_id) + return 0; + /* If streaming is started, return error */ if (vb2_is_busy(&vpfe->buffer_queue)) { vpfe_err(vpfe, "%s device busy\n", __func__); -- 2.17.1