From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755464AbcFPVlr (ORCPT ); Thu, 16 Jun 2016 17:41:47 -0400 Received: from lists.s-osg.org ([54.187.51.154]:48274 "EHLO lists.s-osg.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754676AbcFPVlm (ORCPT ); Thu, 16 Jun 2016 17:41:42 -0400 From: Javier Martinez Canillas To: linux-kernel@vger.kernel.org Cc: Javier Martinez Canillas , Junghak Sung , Kukjin Kim , Seung-Woo Kim , Mauro Carvalho Chehab , linux-samsung-soc@vger.kernel.org, Krzysztof Kozlowski , Geunyoung Kim , Markus Elfring , Hans Verkuil , linux-arm-kernel@lists.infradead.org, linux-media@vger.kernel.org Subject: [PATCH 6/6] [media] gsc-m2m: improve v4l2_capability driver and card fields Date: Thu, 16 Jun 2016 17:40:35 -0400 Message-Id: <1466113235-25909-7-git-send-email-javier@osg.samsung.com> X-Mailer: git-send-email 2.5.5 In-Reply-To: <1466113235-25909-1-git-send-email-javier@osg.samsung.com> References: <1466113235-25909-1-git-send-email-javier@osg.samsung.com> Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org According to the V4L2 documentation the driver and card fields should be used to identify the driver and the device but the gsc-m2m driver fills those field using the platform device name, which in turn is the name of the device DT node. So not only the filled information isn't correct but also the same values are used in the driver, card and bus_info fields. Before this patch: Driver Info (not using libv4l2): Driver name : 13e00000.video- Card type : 13e00000.video-scaler Bus info : platform:13e00000.video-scaler Driver version: 4.7.0 After this patch: Driver Info (not using libv4l2): Driver name : exynos-gsc Card type : exynos-gsc gscaler Bus info : platform:13e00000.video-scaler Driver version: 4.7.0 Signed-off-by: Javier Martinez Canillas --- drivers/media/platform/exynos-gsc/gsc-m2m.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/media/platform/exynos-gsc/gsc-m2m.c b/drivers/media/platform/exynos-gsc/gsc-m2m.c index af81383086b8..274861c27367 100644 --- a/drivers/media/platform/exynos-gsc/gsc-m2m.c +++ b/drivers/media/platform/exynos-gsc/gsc-m2m.c @@ -279,8 +279,8 @@ static int gsc_m2m_querycap(struct file *file, void *fh, struct gsc_ctx *ctx = fh_to_ctx(fh); struct gsc_dev *gsc = ctx->gsc_dev; - strlcpy(cap->driver, gsc->pdev->name, sizeof(cap->driver)); - strlcpy(cap->card, gsc->pdev->name, sizeof(cap->card)); + strlcpy(cap->driver, GSC_MODULE_NAME, sizeof(cap->driver)); + strlcpy(cap->card, GSC_MODULE_NAME " gscaler", sizeof(cap->card)); snprintf(cap->bus_info, sizeof(cap->bus_info), "platform:%s", dev_name(&gsc->pdev->dev)); cap->device_caps = V4L2_CAP_STREAMING | V4L2_CAP_VIDEO_M2M_MPLANE | -- 2.5.5