From patchwork Thu Jun 16 21:40:34 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: 9181771 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 3EE8660760 for ; Thu, 16 Jun 2016 21:42:18 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 3179628379 for ; Thu, 16 Jun 2016 21:42:18 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 262072838A; Thu, 16 Jun 2016 21:42:18 +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=-6.9 required=2.0 tests=BAYES_00,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id D5EAA28379 for ; Thu, 16 Jun 2016 21:42:17 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754221AbcFPVlk (ORCPT ); Thu, 16 Jun 2016 17:41:40 -0400 Received: from lists.s-osg.org ([54.187.51.154]:48269 "EHLO lists.s-osg.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754676AbcFPVlj (ORCPT ); Thu, 16 Jun 2016 17:41:39 -0400 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 53B3CE27F8; Thu, 16 Jun 2016 14:42:24 -0700 (PDT) From: Javier Martinez Canillas To: linux-kernel@vger.kernel.org Cc: Javier Martinez Canillas , Junghak Sung , Kukjin Kim , Seung-Woo Kim , Mauro Carvalho Chehab , Inki Dae , linux-samsung-soc@vger.kernel.org, Krzysztof Kozlowski , Markus Elfring , Hans Verkuil , linux-arm-kernel@lists.infradead.org, linux-media@vger.kernel.org Subject: [PATCH 5/6] [media] gsc-m2m: add device name sufix to bus_info capatiliby field Date: Thu, 16 Jun 2016 17:40:34 -0400 Message-Id: <1466113235-25909-6-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-samsung-soc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-samsung-soc@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP The driver doesn't set the device in the struct v4l2_capability bus_info field so v4l2-compliance reports the following error for VIDIOC_QUERYCAP: Required ioctls: fail: v4l2-compliance.cpp(537): missing bus_info prefix ('platform') test VIDIOC_QUERYCAP: FAIL This patch fixes this by filling also the device besides the bus. Signed-off-by: Javier Martinez Canillas Acked-by: Hans Verkuil --- drivers/media/platform/exynos-gsc/gsc-m2m.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/media/platform/exynos-gsc/gsc-m2m.c b/drivers/media/platform/exynos-gsc/gsc-m2m.c index a600e32e2543..af81383086b8 100644 --- a/drivers/media/platform/exynos-gsc/gsc-m2m.c +++ b/drivers/media/platform/exynos-gsc/gsc-m2m.c @@ -281,7 +281,8 @@ static int gsc_m2m_querycap(struct file *file, void *fh, strlcpy(cap->driver, gsc->pdev->name, sizeof(cap->driver)); strlcpy(cap->card, gsc->pdev->name, sizeof(cap->card)); - strlcpy(cap->bus_info, "platform", sizeof(cap->bus_info)); + 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 | V4L2_CAP_VIDEO_CAPTURE_MPLANE | V4L2_CAP_VIDEO_OUTPUT_MPLANE;