Received: by 2002:a25:31c3:0:0:0:0:0 with SMTP id x186csp4334136ybx; Mon, 4 Nov 2019 11:35:22 -0800 (PST) X-Google-Smtp-Source: APXvYqz+8ehZRBBhA+qExfzQr55bf1EF9Js6c0PCNK5DEIlOTkRJ5WYvZBt3zJAA/OD0VhMDkPKY X-Received: by 2002:a17:906:6004:: with SMTP id o4mr25609707ejj.107.1572896122089; Mon, 04 Nov 2019 11:35:22 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1572896122; cv=none; d=google.com; s=arc-20160816; b=BSb84PwdsyDGW97Q7WY5/jaYqPi1INeyaUsqxOivupdWNXd1q27cyY5WMbtWaNDaDn VFhSlXWsUxlbKURTjBmm53pfrE2/MgO1mEZFQjMl7c+1Sffpgh26MpRx0lm9+EzXOkEQ lZOORMK0Pwug3yUmxHNk7cvqyeDlEA1KnfqB8C5el6GSDFAWwTsz6xuB7vrJpeYAF0w3 pmIfeWUEQ2V7OfE4qlVIxa1t0vgRljOt7gLd2dp73fmHUlTPcXox/g4fylHODWG0bO78 O+qRXtCuYQ1aSIlp0cFDpuc9G8juS5TXc2FszDBec8XxgVc9IVUAv7RMe6cK6kkvvYYF 8FLQ== 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=LTpdyqwlmlBN3as2Mlp96uTOs9xNBA7P2xgFNtJQZ6s=; b=y9OM8Z8Ujbl4mzIupx0eRfu9uTvuGVoY2D4yAYGc/2TnZd2AcEB5gZyQ++3KC26S/X doydP6TcsSAULXvzBdodvYrQEgIXiaYNya1JycR9CRKxUBOqfNXLX9iJz+TI7FTmE9Xn JhrLV8C35I8R3tkV7fv09t/vzEyZzsGeN5XIzX/SsljGFMkP9j5EzB3PLEjsYAOLHCuJ Y5uiVhpcifgA/ud34QWdIu3dLfN5DWtfkouJsfiJDHPjjj12WpioH9zHh7cSwOmyfslG RlxdaK1lFd1MRzdTcszTyHEMsw/jFsZrpMPQNxISoDDriJ67NPoAHMsFm78Rrpo3AIoO uk2g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=NuJrTiS3; 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 b22si3653517ejv.159.2019.11.04.11.34.59; Mon, 04 Nov 2019 11:35:22 -0800 (PST) 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=NuJrTiS3; 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 S1729835AbfKDTcm (ORCPT + 99 others); Mon, 4 Nov 2019 14:32:42 -0500 Received: from fllv0015.ext.ti.com ([198.47.19.141]:47652 "EHLO fllv0015.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2387401AbfKDTc2 (ORCPT ); Mon, 4 Nov 2019 14:32:28 -0500 Received: from fllv0034.itg.ti.com ([10.64.40.246]) by fllv0015.ext.ti.com (8.15.2/8.15.2) with ESMTP id xA4JWRgX000935; Mon, 4 Nov 2019 13:32:27 -0600 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1572895947; bh=LTpdyqwlmlBN3as2Mlp96uTOs9xNBA7P2xgFNtJQZ6s=; h=From:To:CC:Subject:Date:In-Reply-To:References; b=NuJrTiS3HRI8N9bfMxBe133BOEYETko5p2pgj8KHNA/7rpQrthxywQSTQj/z9Y+Z+ BaWk3EC4tE5JKgIBEgY0OROUp9Ry4By5FtwS+BAQ1V5byoTboxB7LBgsTIn5Wev4Rh W7qRmwvoONcFG72bOjqwpo+cnNKuj/e1xz31uE00= Received: from DFLE111.ent.ti.com (dfle111.ent.ti.com [10.64.6.32]) by fllv0034.itg.ti.com (8.15.2/8.15.2) with ESMTPS id xA4JWRhD127232 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=FAIL); Mon, 4 Nov 2019 13:32:27 -0600 Received: from DFLE102.ent.ti.com (10.64.6.23) by DFLE111.ent.ti.com (10.64.6.32) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1713.5; Mon, 4 Nov 2019 13:32:12 -0600 Received: from fllv0040.itg.ti.com (10.64.41.20) by DFLE102.ent.ti.com (10.64.6.23) 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, 4 Nov 2019 13:32:12 -0600 Received: from ula0869644.dal.design.ti.com (ileax41-snat.itg.ti.com [10.172.224.153]) by fllv0040.itg.ti.com (8.15.2/8.15.2) with ESMTP id xA4JVmdH096934; Mon, 4 Nov 2019 13:32:26 -0600 From: Benoit Parrot To: Hans Verkuil CC: , Rob Herring , , , Benoit Parrot Subject: [Patch v2 18/20] media: ti-vpe: cal: fix enum_mbus_code/frame_size subdev arguments Date: Mon, 4 Nov 2019 13:31:38 -0600 Message-ID: <20191104193140.31145-19-bparrot@ti.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20191104193140.31145-1-bparrot@ti.com> References: <20191104193140.31145-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 Make sure that both enum_mbus_code() and enum_framesize() properly populate the .which parameter member, otherwise -EINVAL is return causing the subdev asynchronous registration handshake to fail. Signed-off-by: Benoit Parrot --- drivers/media/platform/ti-vpe/cal.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/media/platform/ti-vpe/cal.c b/drivers/media/platform/ti-vpe/cal.c index cc5af830fa10..1b3b5438b76a 100644 --- a/drivers/media/platform/ti-vpe/cal.c +++ b/drivers/media/platform/ti-vpe/cal.c @@ -1500,6 +1500,7 @@ static int cal_enum_framesizes(struct file *file, void *fh, fse.index = fsize->index; fse.pad = 0; fse.code = fmt->code; + fse.which = V4L2_SUBDEV_FORMAT_ACTIVE; ret = v4l2_subdev_call(ctx->sensor, pad, enum_frame_size, NULL, &fse); if (ret) @@ -1840,6 +1841,7 @@ static int cal_async_bound(struct v4l2_async_notifier *notifier, memset(&mbus_code, 0, sizeof(mbus_code)); mbus_code.index = j; + mbus_code.which = V4L2_SUBDEV_FORMAT_ACTIVE; ret = v4l2_subdev_call(subdev, pad, enum_mbus_code, NULL, &mbus_code); if (ret) -- 2.17.1