Received: by 2002:a25:b323:0:0:0:0:0 with SMTP id l35csp2307335ybj; Mon, 23 Sep 2019 01:15:25 -0700 (PDT) X-Google-Smtp-Source: APXvYqy4x2CvpW/CDSade2lDD73m8k2pUdrej7PN5ZRnzju0dzYvnA+MPUKa22QPlR+iHKqmrIpj X-Received: by 2002:a17:906:4990:: with SMTP id p16mr12603369eju.9.1569226525434; Mon, 23 Sep 2019 01:15:25 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1569226525; cv=none; d=google.com; s=arc-20160816; b=sEU5kiuR844kd+0FqM6/OtBqTpobVY1qySuQ7VTUYWarsEVbU7pvOGuMpp9o1627Ef TXVzm2kKU4ubd1FW0HxU+odNn29ZZUTzNavX+Ad2Mni3bbRsf29O5pTsoqSxvA+gpl8A hQ67u28whr5Yoa70W1kWxSbIf19m/xHF/Y0+aaEHzl70nFmSN/u973NgGOLW9LN/XIjr 2x1k5+nZuuEutWZ4KGDHZVW1lbPWdKFCGXtnKeNWfNm/gQk8Ks48NNZJwNrTysQ83Bh2 v2SiqInk81pJScrd2ap2C5561V9xDWfLaMwpCz5UtZinDVAQ7nDWiA29s+/LxbboizFT GB7w== 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=OLs9Fx+GP/vAxHao2KgOcZ0fVrXqa+C7LZLUsbdEznM=; b=bEzjJ/WwjLTX4mZdv7YkzLY/f2FTGkeTcPEr9SBHgBo2l4Dr348Npo6suZ+hQ02ehP RTnPhAA6hvCjUDL1l9g4OmeI4nF/Rx6JObL4SlX71uTRju2hVN8BIRCwmKOmdtKHbbOi +qd67vwCPK0rqwxEWEMR+iv9VPgmOiPr4/d4DRpzxee5baFmOnPSmyFpbm7A/5fy1o2X Qvuz6l7uzl/bOLX7rGVlc//0vBO78B1LVlenhJ006LGCZLJXsK5fYdRGTAZE7lu33eHy +yYgNnoBNor3jfs7NyRCrA28wNRB5dV+ZDf2peoeblVTu5pyUrHShz3FwwrHIkh1vcW4 nxHg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=toP3JzSo; 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 e7si5956363edn.267.2019.09.23.01.15.02; Mon, 23 Sep 2019 01:15:25 -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=toP3JzSo; 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 S2406123AbfITREd (ORCPT + 99 others); Fri, 20 Sep 2019 13:04:33 -0400 Received: from fllv0015.ext.ti.com ([198.47.19.141]:44090 "EHLO fllv0015.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2405861AbfITREB (ORCPT ); Fri, 20 Sep 2019 13:04:01 -0400 Received: from fllv0035.itg.ti.com ([10.64.41.0]) by fllv0015.ext.ti.com (8.15.2/8.15.2) with ESMTP id x8KH40HF034523; Fri, 20 Sep 2019 12:04:00 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1568999040; bh=OLs9Fx+GP/vAxHao2KgOcZ0fVrXqa+C7LZLUsbdEznM=; h=From:To:CC:Subject:Date:In-Reply-To:References; b=toP3JzSouwjMzbFzz6mDuAAaQAbM2Dj3rK+9vA2i/spUhwah9TQ3xO/g/egW8lv7d nqzfd27WcQKioh5+BHN8AmyguWNLEBz9pKVsIQAlqbE9wtdqtv7uC7cACPH8Cw+m56 Zj1YL73O+q3a+p0ER45lw9950RAFCViIIWnuADRY= Received: from DLEE113.ent.ti.com (dlee113.ent.ti.com [157.170.170.24]) by fllv0035.itg.ti.com (8.15.2/8.15.2) with ESMTP id x8KH40nD055969; Fri, 20 Sep 2019 12:04:00 -0500 Received: from DLEE104.ent.ti.com (157.170.170.34) by DLEE113.ent.ti.com (157.170.170.24) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1713.5; Fri, 20 Sep 2019 12:03:55 -0500 Received: from lelv0327.itg.ti.com (10.180.67.183) by DLEE104.ent.ti.com (157.170.170.34) 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; Fri, 20 Sep 2019 12:03:55 -0500 Received: from uda0869644b.dal.design.ti.com (ileax41-snat.itg.ti.com [10.172.224.153]) by lelv0327.itg.ti.com (8.15.2/8.15.2) with ESMTP id x8KH3r71054719; Fri, 20 Sep 2019 12:04:00 -0500 From: Benoit Parrot To: Hans Verkuil CC: Prabhakar Lad , , , , Benoit Parrot Subject: [Patch v3 07/13] media: am437x-vpfe: Setting STD to current value is not an error Date: Fri, 20 Sep 2019 12:05:48 -0500 Message-ID: <20190920170554.29666-8-bparrot@ti.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20190920170554.29666-1-bparrot@ti.com> References: <20190920170554.29666-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 03415c179c85..8b218f48428f 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