Received: by 2002:a05:6a10:9848:0:0:0:0 with SMTP id x8csp3488913pxf; Mon, 15 Mar 2021 10:38:33 -0700 (PDT) X-Google-Smtp-Source: ABdhPJz/RcCtt/fp1nvTVCHLfa4QO8sDnifC10dBJc7jNf8G0FLxbhrE8UjuavTbJ+cTIzTQoj6R X-Received: by 2002:a05:6402:b70:: with SMTP id cb16mr31359389edb.11.1615829913257; Mon, 15 Mar 2021 10:38:33 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1615829913; cv=none; d=google.com; s=arc-20160816; b=0kL+nmFCu8JCIs3gS25BLVG7TiSGQHU8sbblI/i+GTeNFzG2LASSsMSfhuw1/hd2hI ksF/nGtYCRc0X5sKTOZtGihPYuU15SiweoLgyek1jKzNecYyoersCxmPOl3Se4m6znYt kEDZ/8L+S6iagcBgI5zAojsPiB2zULFdOeEkePgTmWH68olKGQJ4AqttbdlI1BEu4Tu0 Jd3agnULFjxvJagoIu0lcUjM8WG7r3Fcq8rz94J62QXIo/rgC6d2OvbFvIf/yLLY5XZ3 PEURs04cV943XZeHAspSfzpoAoyIJHZqco7JS7UI4+mYMtcZew0K3NNPksJMWu3lgemR tOzA== 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=soZrX7bZGsiX5k9H3diOg1AsKg7GoSGDwOafVa3bJcc=; b=yHX53gQC4w9oTQgEY6Bn8R9D31dRC0N7a65AiyShkG5rAWrfbFCrsQupACvvGLunHN kR66YhzWQSb9JS6PDi86KI9ksyqwigP4k/cEGXddcZipl4iLSBAdaX/0H4uPQcxi6C5E +efxY6lFEddLW8pgG46xsNKfTbVQQ4CrD1cQ8LImVnbm6a/o33s3ocqqQdflOCanDhcs Bh5O4qLfCVKxxeaoqVFRsSRGDb9i8AkGgSTcA90IBEZu6w+d0mGDTFKrE4XILi5E1Esy zbtMmTyOePMZV+Zg48SKS+AeDVusYKvJWEAK8JYWQx8MImteZKP7ion+wkDsxw0DDUr0 mZmQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=hwmJINQF; 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 i22si1274112edc.112.2021.03.15.10.38.09; Mon, 15 Mar 2021 10:38:33 -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=hwmJINQF; 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 S236609AbhCORgv (ORCPT + 99 others); Mon, 15 Mar 2021 13:36:51 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35746 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236038AbhCORgR (ORCPT ); Mon, 15 Mar 2021 13:36:17 -0400 Received: from mail-ej1-x62c.google.com (mail-ej1-x62c.google.com [IPv6:2a00:1450:4864:20::62c]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C7F41C06174A for ; Mon, 15 Mar 2021 10:36:16 -0700 (PDT) Received: by mail-ej1-x62c.google.com with SMTP id lr13so67727300ejb.8 for ; Mon, 15 Mar 2021 10:36:16 -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=soZrX7bZGsiX5k9H3diOg1AsKg7GoSGDwOafVa3bJcc=; b=hwmJINQF7BWP64sbdUotGVEehJ3UEFxD6qJgj/lsR+fUa6zttiqQjRIXop01F38E5w /QhVdjEE8c/n5l0/rSHESvPKMj1ZkPogErGYzNecsIx8kNMPFjvND4W6ZwTZzZkXssA9 y6fSs78tXd5FbqzxSs3aUpAZSCkN0fXjJJRAQ= 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=soZrX7bZGsiX5k9H3diOg1AsKg7GoSGDwOafVa3bJcc=; b=nyTZ5+qkDzSbPX8iiAyXRh81kU6Ypd78V8fa1RdGunjVVdvxbUnOOWGmGCauATtpnj nhOEltSvPk0ZYrqVr/ha/7fUQgSQeO66uJ6A3Fo4+VFltm0nKsdmpehVztOA9Q43pdSS iIxrdCaK5SLwJrZ3MHBpUzh//7ylLUnpqElhP/KPlA0K9XReIoX5Dr3WuAc1OEGWChkK zRQuh+tPkssV63mADku6t4JFBag1TSDl4kxD4CQksMQemm/F4QyEGBqZXYUk1HNIzjh5 0DE5YKLt4ssP/Y8D/Xrrp2K+ZlzMO7NRDXNmkOXsi2wxJP4YmglDLEdFKijYkcK+ZClP wqvQ== X-Gm-Message-State: AOAM531yCViCQYxh5hgEdVvfxe0HxTJcO2+4DGZms9VMBATuNwCif2XY 58GQF0AYWbpE+uNS5F5GoGejmQ== X-Received: by 2002:a17:906:2404:: with SMTP id z4mr24600130eja.14.1615829775599; Mon, 15 Mar 2021 10:36:15 -0700 (PDT) Received: from alco.lan ([80.71.134.83]) by smtp.gmail.com with ESMTPSA id a3sm8109239ejv.40.2021.03.15.10.36.15 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 15 Mar 2021 10:36:15 -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 Cc: Ricardo Ribalda Subject: [PATCH v4 07/11] media: uvcvideo: Use dev->name for querycap() Date: Mon, 15 Mar 2021 18:36:05 +0100 Message-Id: <20210315173609.1547857-8-ribalda@chromium.org> X-Mailer: git-send-email 2.31.0.rc2.261.g7f71774620-goog In-Reply-To: <20210315173609.1547857-1-ribalda@chromium.org> References: <20210315173609.1547857-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 cap->card. 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 36eb48622d48..6c1b037a751b 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