]> git.karo-electronics.de Git - linux-beck.git/commitdiff
[media] vivi/mem2mem_testdev: update to latest bus_info specification
authorHans Verkuil <hans.verkuil@cisco.com>
Fri, 14 Sep 2012 09:23:12 +0000 (06:23 -0300)
committerMauro Carvalho Chehab <mchehab@redhat.com>
Wed, 26 Sep 2012 12:32:41 +0000 (09:32 -0300)
Prefix bus_info with "platform:".

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Acked-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
Acked-by: Sakari Ailus <sakari.ailus@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
drivers/media/platform/mem2mem_testdev.c
drivers/media/platform/vivi.c

index ccbe8750d259f153a73f2c43b8c17e667370ce9f..c1229bef153c9f1ee5d54803ae88a33d9de7ee46 100644 (file)
@@ -430,7 +430,8 @@ static int vidioc_querycap(struct file *file, void *priv,
 {
        strncpy(cap->driver, MEM2MEM_NAME, sizeof(cap->driver) - 1);
        strncpy(cap->card, MEM2MEM_NAME, sizeof(cap->card) - 1);
-       strlcpy(cap->bus_info, MEM2MEM_NAME, sizeof(cap->bus_info));
+       snprintf(cap->bus_info, sizeof(cap->bus_info),
+                       "platform:%s", MEM2MEM_NAME);
        cap->device_caps = V4L2_CAP_VIDEO_M2M | V4L2_CAP_STREAMING;
        cap->capabilities = cap->device_caps | V4L2_CAP_DEVICE_CAPS;
        return 0;
index fca80193aa6e41f88c3539500e1f3623f025f43d..c396da12ad89afd0dcb71c5b885a57b7325e1403 100644 (file)
@@ -898,7 +898,8 @@ static int vidioc_querycap(struct file *file, void  *priv,
 
        strcpy(cap->driver, "vivi");
        strcpy(cap->card, "vivi");
-       strlcpy(cap->bus_info, dev->v4l2_dev.name, sizeof(cap->bus_info));
+       snprintf(cap->bus_info, sizeof(cap->bus_info),
+                       "platform:%s", dev->v4l2_dev.name);
        cap->device_caps = V4L2_CAP_VIDEO_CAPTURE | V4L2_CAP_STREAMING |
                            V4L2_CAP_READWRITE;
        cap->capabilities = cap->device_caps | V4L2_CAP_DEVICE_CAPS;