[media] v4l: ti-vpe: Use correct bus_info name for the device in querycap
authorArchit Taneja <archit@ti.com>
Thu, 6 Mar 2014 10:07:47 +0000 (07:07 -0300)
committerMauro Carvalho Chehab <m.chehab@samsung.com>
Mon, 7 Apr 2014 12:42:49 +0000 (09:42 -0300)
The bus_info parameter in v4l2_capabilities expects a 'platform_' prefix. This
wasn't done in the driver and hence was breaking compliance. Update the bus_info
parameter accordingly.

Reviewed-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Archit Taneja <archit@ti.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
drivers/media/platform/ti-vpe/vpe.c

index c1988a9..4511921 100644 (file)
@@ -1338,7 +1338,8 @@ static int vpe_querycap(struct file *file, void *priv,
 {
        strncpy(cap->driver, VPE_MODULE_NAME, sizeof(cap->driver) - 1);
        strncpy(cap->card, VPE_MODULE_NAME, sizeof(cap->card) - 1);
-       strlcpy(cap->bus_info, VPE_MODULE_NAME, sizeof(cap->bus_info));
+       snprintf(cap->bus_info, sizeof(cap->bus_info), "platform:%s",
+               VPE_MODULE_NAME);
        cap->device_caps  = V4L2_CAP_VIDEO_M2M_MPLANE | V4L2_CAP_STREAMING;
        cap->capabilities = cap->device_caps | V4L2_CAP_DEVICE_CAPS;
        return 0;