Received: by 2002:a05:6a10:d5a5:0:0:0:0 with SMTP id gn37csp782167pxb; Wed, 6 Oct 2021 15:29:14 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyHIVC0GBS0UOwBSHAtuI92EvxD3jCPQJK1N13jiXn7F0hIniQunucFpqE7CXWYX1vkVgAw X-Received: by 2002:a17:906:a3c4:: with SMTP id ca4mr991306ejb.529.1633559354586; Wed, 06 Oct 2021 15:29:14 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1633559354; cv=none; d=google.com; s=arc-20160816; b=xHx8OKb/ji8b7JlmU03GCeDqtC81rppPY3CCSQFk7aBfsqiLaXoXyNgObcGC8Ap+rb RFPNHBVtzXmQ7+V6w7IQ8wsarlSFYlKFGckgrRm40Bhc9IG+04GSdyqHjxQL4xltEwg5 wwApY5P1O5HVPQiolGOUzdBAjGOL+ghmKfuKY1W7W45W67/Ue5zR9r8MUL9hbkLQIXFK +WacCGEahIzxQ6fq7q/8p3cgGYhtkTkzPi0npa0YyCHmJMVj2kZhhvDpQFyOTHqqIvqU ROXlnWZcwXkcl1jwJBb2Y48EAH3571WwCgdVL+nzsVg/y1Qf/lHVZpSuWupYOA01mEhM ZtSA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=7odANBHAWb0MKUE6RXoy8eaBQaofMXLclz0gSYDBnCk=; b=YW5Ywp9/Q6aVna7X7OnCTpGS4RoH+CmFi/jFvUTf8OZ6WIgjAqgidvTcUUFN1Q9V5h bz4W18nFYSjlGhRNU0L92OyhdfhvCrZYGPUgn8t4CJKSlFbbjvN+9Qiel9XUI/k1d83o 1ABnCUr20v5g2GhTMU+WixrnmYhbyVG6a5EwDRLRTb60ht9rp7BLBoxaL9YI248P2fmL b6JYQUD5QefQ+BtAeySwZppdYniqC8VoNnbB83R5TlhI8pUaRJ1zpc77jihv01nsrqyi YGDf/HUp2bmo45FOEavIYINUcUq5OqlWcyQOG/yiwYqE4J6WA25/la7MpjrFJvQSLyPI 0/2g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=A7woCrFT; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id r14si9003138ejc.394.2021.10.06.15.28.50; Wed, 06 Oct 2021 15:29:14 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=A7woCrFT; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S239882AbhJFW2d (ORCPT + 99 others); Wed, 6 Oct 2021 18:28:33 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35996 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S239821AbhJFW2Y (ORCPT ); Wed, 6 Oct 2021 18:28:24 -0400 Received: from mail-ed1-x530.google.com (mail-ed1-x530.google.com [IPv6:2a00:1450:4864:20::530]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A3536C061755 for ; Wed, 6 Oct 2021 15:26:31 -0700 (PDT) Received: by mail-ed1-x530.google.com with SMTP id g8so15371729edt.7 for ; Wed, 06 Oct 2021 15:26:31 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=7odANBHAWb0MKUE6RXoy8eaBQaofMXLclz0gSYDBnCk=; b=A7woCrFTfUf/nTKHASUT0blTMZZ9Za5LvEE6q7CUElPVVOdm9PgOsAWS9PPJ6OjhbC 0COvc27TYKm08Pj2wnnfKGY+Dgklms89lcAz7230MHCIJvGndcJFbtvpc0YiJ6iRRDad PkRypdCeTS7keqtGjx3dyEg4tRGKtHX9R9nxM= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=7odANBHAWb0MKUE6RXoy8eaBQaofMXLclz0gSYDBnCk=; b=QM27FhXtjD9uKMcrSfvGHCy7euYLCVeN0weJ6tpue7/5h3oVhzNuPLcAOpQQJzYbDN VSVVNHKqR5JT4OwjnpxvPs8tKT4ZMRkY2hCYaqSH/rWcxps/R0jc31M7a8uWLkuAtiwc vhReNxCQ8VtLW6XiRJhEFFtVJHgBqQ0YGmIkW+/7uqjilaOI0UpZMMxKKbk5iOfP9Dbo 60sOt3uI4Xpx5oxs48fiCNcT5StsG2aVD70GYK1Jzgt2jpqMaWsCobnCcyk5hw3Tasxd D6fDz4Bv8Ihca2MjFFuZwt5N9CoHbEYLlXku0YL3xOJniIdkwMuy3aqwCUE23PTWuNc8 f/OA== X-Gm-Message-State: AOAM533scYsLHRmFAbwqT/8GhfUywJ8f2RZMsH+lHE4IaFsbhIg1cTee CieURmaYoxwi6/2rJqxE5+u69A== X-Received: by 2002:a17:906:774f:: with SMTP id o15mr1071833ejn.200.1633559190318; Wed, 06 Oct 2021 15:26:30 -0700 (PDT) Received: from alco.lan (80.71.134.83.ipv4.parknet.dk. [80.71.134.83]) by smtp.gmail.com with ESMTPSA id h7sm10557906edt.37.2021.10.06.15.26.29 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 06 Oct 2021 15:26:30 -0700 (PDT) From: Ricardo Ribalda To: Mauro Carvalho Chehab , Yong Zhi , Bingbu Cao , linux-media@vger.kernel.org, linux-kernel@vger.kernel.org, Chiranjeevi Rapolu , Sakari Ailus Cc: Ricardo Ribalda Subject: [PATCH v4 5/8] media: ipu3-imgu: VIDIOC_QUERYCAP: Fix bus_info Date: Thu, 7 Oct 2021 00:26:22 +0200 Message-Id: <20211006222625.401122-6-ribalda@chromium.org> X-Mailer: git-send-email 2.33.0.800.g4c38ced690-goog In-Reply-To: <20211006222625.401122-1-ribalda@chromium.org> References: <20211006222625.401122-1-ribalda@chromium.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org bus_info field had a different value for the media entity and the video device. Fixes v4l2-compliance: v4l2-compliance.cpp(637): media bus_info 'PCI:0000:00:05.0' differs from V4L2 bus_info 'PCI:viewfinder' Reviewed-by: Bingbu Cao Signed-off-by: Ricardo Ribalda --- drivers/staging/media/ipu3/ipu3-v4l2.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/drivers/staging/media/ipu3/ipu3-v4l2.c b/drivers/staging/media/ipu3/ipu3-v4l2.c index 69ef820619ab..0473457b4e64 100644 --- a/drivers/staging/media/ipu3/ipu3-v4l2.c +++ b/drivers/staging/media/ipu3/ipu3-v4l2.c @@ -592,11 +592,12 @@ static const struct imgu_fmt *find_format(struct v4l2_format *f, u32 type) static int imgu_vidioc_querycap(struct file *file, void *fh, struct v4l2_capability *cap) { - struct imgu_video_device *node = file_to_intel_imgu_node(file); + struct imgu_device *imgu = video_drvdata(file); strscpy(cap->driver, IMGU_NAME, sizeof(cap->driver)); strscpy(cap->card, IMGU_NAME, sizeof(cap->card)); - snprintf(cap->bus_info, sizeof(cap->bus_info), "PCI:%s", node->name); + snprintf(cap->bus_info, sizeof(cap->bus_info), "PCI:%s", + pci_name(imgu->pci_dev)); return 0; } -- 2.33.0.800.g4c38ced690-goog