From patchwork Wed Mar 17 16:45:05 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ricardo Ribalda X-Patchwork-Id: 403553 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-19.0 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_CR_TRAILER, INCLUDES_PATCH, MAILING_LIST_MULTI, SPF_HELO_NONE, SPF_PASS, USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id BB129C28E86 for ; Wed, 17 Mar 2021 16:46:10 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 7451164F6E for ; Wed, 17 Mar 2021 16:46:10 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232743AbhCQQpk (ORCPT ); Wed, 17 Mar 2021 12:45:40 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56320 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232659AbhCQQpW (ORCPT ); Wed, 17 Mar 2021 12:45:22 -0400 Received: from mail-ej1-x62a.google.com (mail-ej1-x62a.google.com [IPv6:2a00:1450:4864:20::62a]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id F14CBC06174A for ; Wed, 17 Mar 2021 09:45:21 -0700 (PDT) Received: by mail-ej1-x62a.google.com with SMTP id jt13so3723437ejb.0 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=bT2gxAGi9DGf7qoiTUKFi2y17Zk4Wi53fpjUBvwk8Y57mPuMwdztLJC9gL+bLXNL4j WeIdDIavo1VrV04CxBVXmdcvGoh8eRY6bEMF8R18lLF/ER2ZSdsUU/ILLtMDsOwVYok7 HYlP8HkCLjKULTf5GkOIyzm9sY26TZlSvAirMRfFjjegP4oo3S8ouBvl3Dix93VXJ6D2 mS1MY27yKwmZngNIjhrA1Am15rc9CuuA3kdT30TFjk8qvNlKSS+XynwNcfhqFGeLHBFa qF1J2U3PK5W6j83yuh4kLpGRtQOWbI7UpzDZqlGSC99dYnalAlftagupzTuVFF0K0V0C JM7Q== X-Gm-Message-State: AOAM533hVPisNSHK+GXafzntOYo9TxEnnEJZm5XTHitd1FPEbuEWBOiX wCQu/6sp83S5E8g7ZTdjPHcQPw== X-Google-Smtp-Source: ABdhPJzlkvg8lHS0Wq/Qi5Kr/d+2z7V9eTDJEPi9neHOhgQ2YJReRabHUG/norN+btgZYj+cB8w2kw== 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 Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org Use the device name for the card name instead of vdev->name. Suggested-by: Laurent Pinchart Signed-off-by: Ricardo Ribalda Signed-off-by: Hans Verkuil --- 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;