Re: [PATCH 5/6] [media] gsc-m2m: add device name sufix to bus_info capatiliby field

2016-06-17 Thread Hans Verkuil
On 06/16/2016 11:40 PM, Javier Martinez Canillas wrote:
> 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 

Thanks!

Hans

> ---
> 
>  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(>pdev->dev));
>   cap->device_caps = V4L2_CAP_STREAMING | V4L2_CAP_VIDEO_M2M_MPLANE |
>   V4L2_CAP_VIDEO_CAPTURE_MPLANE | V4L2_CAP_VIDEO_OUTPUT_MPLANE;
>  
> 
--
To unsubscribe from this list: send the line "unsubscribe linux-media" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH 5/6] [media] gsc-m2m: add device name sufix to bus_info capatiliby field

2016-06-16 Thread Javier Martinez Canillas
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 
---

 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(>pdev->dev));
cap->device_caps = V4L2_CAP_STREAMING | V4L2_CAP_VIDEO_M2M_MPLANE |
V4L2_CAP_VIDEO_CAPTURE_MPLANE | V4L2_CAP_VIDEO_OUTPUT_MPLANE;
 
-- 
2.5.5

--
To unsubscribe from this list: send the line "unsubscribe linux-media" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html