linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Javier Martinez Canillas <javier@osg.samsung.com>
To: linux-kernel@vger.kernel.org
Cc: Javier Martinez Canillas <javier@osg.samsung.com>,
	Junghak Sung <jh1009.sung@samsung.com>,
	Kukjin Kim <kgene@kernel.org>,
	Seung-Woo Kim <sw0312.kim@samsung.com>,
	Mauro Carvalho Chehab <mchehab@osg.samsung.com>,
	linux-samsung-soc@vger.kernel.org,
	Krzysztof Kozlowski <k.kozlowski@samsung.com>,
	Geunyoung Kim <nenggun.kim@samsung.com>,
	Markus Elfring <elfring@users.sourceforge.net>,
	Hans Verkuil <hans.verkuil@cisco.com>,
	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	[thread overview]
Message-ID: <1466113235-25909-7-git-send-email-javier@osg.samsung.com> (raw)
In-Reply-To: <1466113235-25909-1-git-send-email-javier@osg.samsung.com>

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 <javier@osg.samsung.com>

---

 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

  parent reply	other threads:[~2016-06-16 21:41 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-06-16 21:40 [PATCH 0/6] [media] Fixes and improvements for VIDIOC_QUERYCAP in Samsung media drivers Javier Martinez Canillas
2016-06-16 21:40 ` [PATCH 1/6] [media] s5p-mfc: set capablity bus_info as required by VIDIOC_QUERYCAP Javier Martinez Canillas
2016-06-17  7:11   ` Hans Verkuil
2016-06-29 19:43   ` Shuah Khan
2016-06-16 21:40 ` [PATCH 2/6] [media] s5p-mfc: improve v4l2_capability driver and card fields Javier Martinez Canillas
2016-06-17  7:12   ` Hans Verkuil
2016-06-29 19:45   ` Shuah Khan
2016-06-16 21:40 ` [PATCH 3/6] [media] s5p-jpeg: set capablity bus_info as required by VIDIOC_QUERYCAP Javier Martinez Canillas
2016-06-17  6:45   ` Jacek Anaszewski
2016-06-17  7:12   ` Hans Verkuil
2016-06-29 19:46   ` Shuah Khan
2016-06-16 21:40 ` [PATCH 4/6] [media] s5p-jpeg: only fill driver's name in capabilities driver field Javier Martinez Canillas
2016-06-17  6:45   ` Jacek Anaszewski
2016-06-17  7:13   ` Hans Verkuil
2016-06-29 19:47   ` Shuah Khan
2016-06-16 21:40 ` [PATCH 5/6] [media] gsc-m2m: add device name sufix to bus_info capatiliby field Javier Martinez Canillas
2016-06-17  7:13   ` Hans Verkuil
2016-06-16 21:40 ` Javier Martinez Canillas [this message]
2016-06-17  7:13   ` [PATCH 6/6] [media] gsc-m2m: improve v4l2_capability driver and card fields Hans Verkuil

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1466113235-25909-7-git-send-email-javier@osg.samsung.com \
    --to=javier@osg.samsung.com \
    --cc=elfring@users.sourceforge.net \
    --cc=hans.verkuil@cisco.com \
    --cc=jh1009.sung@samsung.com \
    --cc=k.kozlowski@samsung.com \
    --cc=kgene@kernel.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-media@vger.kernel.org \
    --cc=linux-samsung-soc@vger.kernel.org \
    --cc=mchehab@osg.samsung.com \
    --cc=nenggun.kim@samsung.com \
    --cc=sw0312.kim@samsung.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).