Received: by 2002:a05:6a10:9848:0:0:0:0 with SMTP id x8csp4512492pxf; Tue, 16 Mar 2021 15:53:49 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxJa/xTnxLsxXr99wlYdUfYAogWf1XenzsPzdTmS5VDErbyWo3Urk9PXkxv47EdrCUalV8j X-Received: by 2002:a17:906:dfcc:: with SMTP id jt12mr32686502ejc.31.1615935229181; Tue, 16 Mar 2021 15:53:49 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1615935229; cv=none; d=google.com; s=arc-20160816; b=UcXsnHlVhvUdgmX2oMOaU5zI4y7EXoCu8yIQcv04fMv4dCVBtUv8fR+BUIgoiv4qco seXFMP/ICQLu+AKLaOKT4KwVlw8VGYKNi7FcXsIBFMCbZh3xm37cUEbgsAMqEzvcGhSf zKugCbsqwcpFC3Xap0VUv/JRep6+umKbAuVtCp1wXxBZ2rAhgJiWgE3wv9gd4AnTn2zB BgbNQn3cn/ITilZ4aq8KZBgJOYLSIusI70k2WWZF6tB+HmHo71/pZUlGn1hMZWtZkHtE 5k6fkAMJlrP2cMFkhoqgpxgeWHKiyS2daDJunjl66Ih0Nuxu5mYg1zPR6qV+SQ1mKjhx VMWg== 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=J8oMD/QgkrLzNEWZ+K26lrfQoeli8yiD0qozk10hUh8=; b=Njbj4gNrZnk7sAiw86SPmR7tQ/7GTqqaP7QYvNxkiMvVtawJWFflHT4CDYqnm4MmL+ Bq03X9sYs5jA34ri7NWi3OVY/ASPRFacGidTzcs43B3Isgz4q5CeCK0K2A8dlWUyk11r kGHCZ0kaZ2qhG7gY8aw1+yQr/ItAuFtE9ylOpbS3lsWletnqe2/S7sIimY+cTed/R7un umi8pkKLxCsRtzl9B1khlscbOhFCl7eSKTVRly2+bSNWmLuDXqEP8DDz3Hh7dIh8wB07 ZPXu8NiQUxC3ee4wxjYs8cQCKDmtTbJPF4bFZCT/o7v0XpztAVPSP/G/mevqhzB9bEkq dVUg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=LI5CfwGG; 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 4si15038955edc.544.2021.03.16.15.53.26; Tue, 16 Mar 2021 15:53:49 -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=LI5CfwGG; 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 S239759AbhCPSCz (ORCPT + 99 others); Tue, 16 Mar 2021 14:02:55 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41298 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S239572AbhCPSAV (ORCPT ); Tue, 16 Mar 2021 14:00:21 -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 063FDC0613DD for ; Tue, 16 Mar 2021 11:00:15 -0700 (PDT) Received: by mail-ej1-x62a.google.com with SMTP id r17so73663537ejy.13 for ; Tue, 16 Mar 2021 11:00:14 -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=J8oMD/QgkrLzNEWZ+K26lrfQoeli8yiD0qozk10hUh8=; b=LI5CfwGGPY39+fS4JVntvvlCF6rf24a+lwPKZJUp4+BoLx1O3MkRocXjf38pTQdAL4 DnHPJ0+lsVrUSKOqydfjJ8tKVdkwoKw0/WbXzbGiQDHoRl4DY0EQBOR3SpaPhnPlTHJd AuDCk3IDLJH83iCmmvKFdtBIvA0wU1lN/wMc4= 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=J8oMD/QgkrLzNEWZ+K26lrfQoeli8yiD0qozk10hUh8=; b=Mgc9uYnY+fYPdBEZ3j9K3jw9rzpfmWf6x9tMBu4NpQY6it3tv8yFIhu49igWnKWME/ 0lXKf8vppRffdjw8xWtU3LYAcuFz4hxuNsMdGgl0x7ESo5WQPvgIua7ifyAD+NMZFVev /45NiyaCph6Ti8q53DVhfQV0tLByQvBCyUa+y5bh/yvWCKP5kRBalhtnOEy39i1NPg7H +mYgCSyuvmc5vgreisyij5xIGQ8Gmts711ddr2DSDNWyXiHvOUkE1eUTSVJUvq1H5TtS ikE34HJYL/RFxovkbGKZIRxVdp+TMZRqRGCATavtD0gDyiAdArZiyt6CpIsNvj13OAVq DpmQ== X-Gm-Message-State: AOAM533u9juFm5oiT8BZk2QmtBujPRjHu7bRwTKbzLYepIHB39rZDERX podZdC0aQodJKTalJguIcGL6sg== X-Received: by 2002:a17:906:489b:: with SMTP id v27mr31061620ejq.1.1615917611763; Tue, 16 Mar 2021 11:00:11 -0700 (PDT) Received: from alco.lan ([80.71.134.83]) by smtp.gmail.com with ESMTPSA id c19sm10953182edu.20.2021.03.16.11.00.11 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 16 Mar 2021 11:00:11 -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 v5 07/13] media: uvcvideo: Use dev->name for querycap() Date: Tue, 16 Mar 2021 18:59:57 +0100 Message-Id: <20210316180004.1605727-8-ribalda@chromium.org> X-Mailer: git-send-email 2.31.0.rc2.261.g7f71774620-goog In-Reply-To: <20210316180004.1605727-1-ribalda@chromium.org> References: <20210316180004.1605727-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 e956d833ed84..d780065f3716 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