From patchwork Thu Jun 16 21:40:35 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Javier Martinez Canillas X-Patchwork-Id: 9181801 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 6EC5A60760 for ; Thu, 16 Jun 2016 21:44:41 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 6119A28388 for ; Thu, 16 Jun 2016 21:44:41 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 556842838A; Thu, 16 Jun 2016 21:44:41 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-4.2 required=2.0 tests=BAYES_00, RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.9]) (using TLSv1.2 with cipher AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 1859528388 for ; Thu, 16 Jun 2016 21:44:41 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1bDf4N-0005nu-At; Thu, 16 Jun 2016 21:43:23 +0000 Received: from lists.s-osg.org ([54.187.51.154]) by bombadil.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1bDf34-0004Vs-1m for linux-arm-kernel@lists.infradead.org; Thu, 16 Jun 2016 21:42:03 +0000 Received: from minerva.sisa.samsung.com (host-6.58.217.201.copaco.com.py [201.217.58.6]) by lists.s-osg.org (Postfix) with ESMTPSA id B7CBFE27F4; Thu, 16 Jun 2016 14:42:31 -0700 (PDT) From: Javier Martinez Canillas To: linux-kernel@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> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20160616_144202_542323_A643A456 X-CRM114-Status: GOOD ( 10.69 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Krzysztof Kozlowski , linux-samsung-soc@vger.kernel.org, Mauro Carvalho Chehab , Seung-Woo Kim , Markus Elfring , Javier Martinez Canillas , Kukjin Kim , Hans Verkuil , Geunyoung Kim , Junghak Sung , linux-arm-kernel@lists.infradead.org, linux-media@vger.kernel.org MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP 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 Acked-by: Hans Verkuil --- 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 |