Received: by 2002:a05:6a10:9848:0:0:0:0 with SMTP id x8csp525130pxf; Wed, 17 Mar 2021 09:46:54 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxGwEh7DyovwUCuxw/xo49GGfKMVuyypK3Zo5dA2gbmP0IPy0dsg0imckWCp/5UZlA2atg4 X-Received: by 2002:a17:906:260a:: with SMTP id h10mr36875447ejc.392.1615999614397; Wed, 17 Mar 2021 09:46:54 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1615999614; cv=none; d=google.com; s=arc-20160816; b=XTRPHZkLnuGtaRGkWiReE4I7omi8SNL+vC0LoB+nwpjHLQhESdks9iNbhNTfJCUn00 qBhHn2Jx+hPHfTVf6WPOM2SC/6qD7rXovBy8roASVXk/Rb6YWH2Wjb9onb/f2hFUpxsS bmtJ/BW7PV3RpiouC8xle//92cAhdguSPoCUUolROMcxjAr5HOE8x+04iTcKlJ6e/wwa TtnLeY/+woaownMIkLV56T3Cp8A9P4zzUt7uCXFuun0RBGGuOawXMD2UO3XpAoxSRiw/ y2gsWZk7ijk6FpWJ7RCRaWwshS5Ivpvsl/QXEb4ww9oR/P5vrh07AFgawoVkpnY2WvNP sXJg== 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=9aWeCfV8UxlF8kOZZJF1BajdZK+SGKrtPDXzvwvjlk0=; b=Z0wNx8/4c6ROkS04mhIaHLLIYWnd65I4xFdlFhLU2l+8SEScsHgnYlU/O0IN8gUrWZ BFANUUKRh0+U3wP/Uqk4Lmg9C4v0KBLw9nxAKc4Gq0fgVJ/Ra0KJlR8uppHk10AibAl4 YPolWgvw7M4SyQ2N1DAkYQyWjoDu4X2hamIKDTFDwGqzu2oYEL0Z++fIMw+4E6fK7TG4 uJCd52ciOwHq9sHz0xNXB3lvRxSxfwLWfa4+i049Qr8OJ/mtFfVzJNN2F9nPAp/nHQt/ 05UmgMt4M/7YU13gFdSRCVjgy+RejM/rg9bq0f4BPDh55flP/PccBW2XrCer+pcCQTiK uSlg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=CarKUWJR; 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 h23si16912499edw.60.2021.03.17.09.46.30; Wed, 17 Mar 2021 09:46:54 -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=CarKUWJR; 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 S232803AbhCQQpt (ORCPT + 99 others); Wed, 17 Mar 2021 12:45:49 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56322 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232660AbhCQQpW (ORCPT ); Wed, 17 Mar 2021 12:45:22 -0400 Received: from mail-ej1-x636.google.com (mail-ej1-x636.google.com [IPv6:2a00:1450:4864:20::636]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id F38B8C06175F for ; Wed, 17 Mar 2021 09:45:21 -0700 (PDT) Received: by mail-ej1-x636.google.com with SMTP id ci14so3674315ejc.7 for ; Wed, 17 Mar 2021 09:45:21 -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=9aWeCfV8UxlF8kOZZJF1BajdZK+SGKrtPDXzvwvjlk0=; b=CarKUWJRLjMtruMjeF0IEiNqqyXLcGquCxnbZconfbwk+VI+4R2TWbTAKLH8d1i4r3 RIuijYo7HuRH2Tat9bDMo5F+JE1WIqxnPf5FRYkfa8dKvZBfqVzT1ajpHCCobT2FPtVE /7qe9Ky3Tufx1kvNaqufoyIFGOQeRBrKVGYMo= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=9aWeCfV8UxlF8kOZZJF1BajdZK+SGKrtPDXzvwvjlk0=; b=dThZHQL/bGWeoawbbO2QKELnTw3Tvo1jjyZWioI+g4NzWTSYXvv7Con3Xk7ZoWWd6m vqGUyuppe98OonRuoDXREDAbB75dOGBqg1ghVeD6rwEK3ORgTVS9soiwG+GjK3Smek0G UY7kKCdQHm2ZHPazUrshkVoEGgCkvv/3JuXabeYG5Ht/ofXSdo7826GaQs5nk73i2xBi mgU9tXjpzBe4yPiR/0nZSVLdAdVObaoioI4dfI4m4G1cYpT752709Tsz9wKwiY2YwMxQ HExj+9ZvJgl+rwjhO44UUH2OTTCBZbcOzJYlG/f7b9W42+QqSImvStjmDiJ7nTMXWg0Z V0rA== X-Gm-Message-State: AOAM5308vqxq0t1u/490ixrZQBCQRsX0hEuOx0PX5gpivZKqXAGLTvA+ RjC8RCrIH+ZvIqIXq30xLcsT2A== X-Received: by 2002:a17:906:eb89:: with SMTP id mh9mr37073869ejb.122.1615999520732; Wed, 17 Mar 2021 09:45:20 -0700 (PDT) Received: from alco.lan ([80.71.134.83]) by smtp.gmail.com with ESMTPSA id hy25sm12088128ejc.119.2021.03.17.09.45.20 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 17 Mar 2021 09:45:20 -0700 (PDT) From: Ricardo Ribalda To: Laurent Pinchart , Mauro Carvalho Chehab , Hans Verkuil , Sergey Senozhatsky , linux-media@vger.kernel.org, linux-kernel@vger.kernel.org, tfiga@chromium.org Cc: Ricardo Ribalda Subject: [PATCH v6 11/17] media: uvcvideo: Use dev->name for querycap() Date: Wed, 17 Mar 2021 17:45:05 +0100 Message-Id: <20210317164511.39967-12-ribalda@chromium.org> X-Mailer: git-send-email 2.31.0.rc2.261.g7f71774620-goog In-Reply-To: <20210317164511.39967-1-ribalda@chromium.org> References: <20210317164511.39967-1-ribalda@chromium.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Use the device name for the card name instead of vdev->name. Suggested-by: Laurent Pinchart Signed-off-by: Ricardo Ribalda --- drivers/media/usb/uvc/uvc_v4l2.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/media/usb/uvc/uvc_v4l2.c b/drivers/media/usb/uvc/uvc_v4l2.c index 397217171bbb..dd10cb9361fa 100644 --- a/drivers/media/usb/uvc/uvc_v4l2.c +++ b/drivers/media/usb/uvc/uvc_v4l2.c @@ -617,13 +617,12 @@ static int uvc_v4l2_release(struct file *file) static int uvc_ioctl_querycap(struct file *file, void *fh, struct v4l2_capability *cap) { - struct video_device *vdev = video_devdata(file); struct uvc_fh *handle = file->private_data; struct uvc_video_chain *chain = handle->chain; struct uvc_streaming *stream = handle->stream; strscpy(cap->driver, "uvcvideo", sizeof(cap->driver)); - strscpy(cap->card, vdev->name, sizeof(cap->card)); + strscpy(cap->card, handle->stream->dev->name, sizeof(cap->card)); usb_make_path(stream->dev->udev, cap->bus_info, sizeof(cap->bus_info)); cap->capabilities = V4L2_CAP_DEVICE_CAPS | V4L2_CAP_STREAMING | chain->caps; -- 2.31.0.rc2.261.g7f71774620-goog