Received: by 2002:a05:6a10:d5a5:0:0:0:0 with SMTP id gn37csp1137299pxb; Fri, 1 Oct 2021 04:27:31 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyq4ntU2DoU3TasskgAu8J1Qgi1IR2Dj9vaM5FiIbLfa6L4Kc/UzMrIzFRygQt9Hf7u+fSG X-Received: by 2002:a17:902:cec3:b0:13e:5f04:309b with SMTP id d3-20020a170902cec300b0013e5f04309bmr10247702plg.87.1633087651316; Fri, 01 Oct 2021 04:27:31 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1633087651; cv=none; d=google.com; s=arc-20160816; b=D6owBSqpXiBaCoD0YCEo05PHxY+4EbF72dPDvJZgMgVG1I7zLGFoC+yZD0OepjoMtJ KdaP4aoCEH1k02TMXvfnS/Su6TcHPLNY4uBZDezzPnNaEh8HffT54DQpFdIxGhEyY3Um i/Qe4eb6d/PSgaOFBFfqQ4Dt+6T+pharCy/R493rjOJEno5bof+EcJ5yZ1TDi3D/EXj9 9vyyZofyiFRkn2O3FUbi8Jy4MJcPZhC4kve/1vqXeEV2ji4iSJ0/uj0jAj0xQ/7SVgo+ MWchS4W3KTVLSgroyTPNQRj0t0s2jNeA9I00qWceQFSJnZQnze5Y85BMupFeNOQXn8UQ IAbA== 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=7gLZK8PdbeRKM6yKe+al6KCGRIW1PaVpWWADOyHb+A8=; b=JdotIngWZHOhV2Snr4DNA3wYSYJGPLZ61SedboQvhtVj/40BBkmKI81zfmPiIOVgxQ uvbKVXy5HjDw97U9W2+rW/sYk6mOJzeCeg16PPdhPxKHmsOIVBwsSvIPf8DeDiU99uGP cpzAiJMVldPv4UoZY83GKOgUa1FX4FLMUFJ0C5ILypBqjM+I1C2mcNQXOsOJh69CUkVD xdubZe/2wdUKwr+huFRncFYjA5QCwhUWj6AJ8za5wOo7a6ROnW5NooSpfNjbOSEguV4/ rYP7OL05YrmbzlEoAzTq2pY4KNHU7EQnata8jmRRvP/DGHS7koNV/t1BXvK0PHT7lw85 5SUQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=c0PIqTzX; 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 h5si7706196pfn.202.2021.10.01.04.27.18; Fri, 01 Oct 2021 04:27:31 -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=c0PIqTzX; 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 S1353891AbhJAL1a (ORCPT + 99 others); Fri, 1 Oct 2021 07:27:30 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38846 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1353796AbhJAL1M (ORCPT ); Fri, 1 Oct 2021 07:27:12 -0400 Received: from mail-wr1-x433.google.com (mail-wr1-x433.google.com [IPv6:2a00:1450:4864:20::433]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B7EA6C06177D for ; Fri, 1 Oct 2021 04:25:28 -0700 (PDT) Received: by mail-wr1-x433.google.com with SMTP id d6so14881552wrc.11 for ; Fri, 01 Oct 2021 04:25:28 -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=7gLZK8PdbeRKM6yKe+al6KCGRIW1PaVpWWADOyHb+A8=; b=c0PIqTzXBtRzvzFVdawJzOuSiftzl9N7n51LfPQzWJaaKBT5JjZq24sk8yNqXjPaXj g/1SSy0VHG8sN6JM3Wa8Q+/IGSdMAiqQuyLVe59SeOqwCgXZ3sjZ5xPLvJpLtzOv8rdF AOwVrGwpuZOQY86VZAqH8m9gyP4ddgl6WDRVk= 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=7gLZK8PdbeRKM6yKe+al6KCGRIW1PaVpWWADOyHb+A8=; b=MbK6e+LY0venkvkzPgQyMJKfHTzarTONDO5Q86+7kFCiYDcNfmpcjWv9ct97hSqpv9 Td+R8ldkxWeaepXox2lk+3B9h9NbQejpqGKsUDslPBwdy2K8xS/sSxEN7rpKa6DKOhAW 1lg1YE7VP1GIRogbxtnp7pPt+9o2VTZ+R+GHAOHB8QRC+uKxZmRAyPbzYqeQL8ZXXfU4 zTykFP2Igse8NIU7KtTEwK8ny7OZu2IRdvT5jDWqUdpR+eLWKQmphO/yHGFnI2UJitrN gcMGCDsH3wKmMJ6iziBB2f4YdA+gLpHWf2zgANFGNo6rE9r/1cCyceLQEOirbBkKJ2HA bXAA== X-Gm-Message-State: AOAM533Axu42qltuPdvMyvV1ZgajeprJsuApHTEZJLw4vZJW2tGKUhfb GjXYQz9qBavamNOGW00scN2VHA== X-Received: by 2002:adf:fec6:: with SMTP id q6mr11481828wrs.122.1633087527336; Fri, 01 Oct 2021 04:25:27 -0700 (PDT) Received: from beni.c.googlers.com.com (216.131.76.34.bc.googleusercontent.com. [34.76.131.216]) by smtp.gmail.com with ESMTPSA id x17sm5530958wrc.51.2021.10.01.04.25.26 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 01 Oct 2021 04:25:27 -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 v3 5/8] media: ipu3-imgu: VIDIOC_QUERYCAP: Fix bus_info Date: Fri, 1 Oct 2021 11:25:19 +0000 Message-Id: <20211001112522.2839602-6-ribalda@chromium.org> X-Mailer: git-send-email 2.33.0.800.g4c38ced690-goog In-Reply-To: <20211001112522.2839602-1-ribalda@chromium.org> References: <20211001112522.2839602-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 bf3cd1d576280..a2164b6708236 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