[media] mem2mem: set missing v4l2_dev pointer
authorHans Verkuil <hans.verkuil@cisco.com>
Thu, 27 Jun 2013 05:44:04 +0000 (02:44 -0300)
committerMauro Carvalho Chehab <mchehab@redhat.com>
Fri, 28 Jun 2013 18:09:43 +0000 (15:09 -0300)
The m2m-deinterlace, mem2mem_testdev and mx2_emmaprp drivers didn't set
the v4l2_dev pointer in struct video_device, even though a v4l2_device was
registered correctly. These days this v4l2_dev pointer must be set correctly,
so this patch adds that for these three drivers.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
drivers/media/platform/m2m-deinterlace.c
drivers/media/platform/mem2mem_testdev.c
drivers/media/platform/mx2_emmaprp.c

index 7585646495892ea9693bcd73b75337b2a04d2e0a..540516ca872c53a05d3bce4dbcf3cb9b3a87b4e3 100644 (file)
@@ -1033,6 +1033,7 @@ static int deinterlace_probe(struct platform_device *pdev)
 
        *vfd = deinterlace_videodev;
        vfd->lock = &pcdev->dev_mutex;
+       vfd->v4l2_dev = &pcdev->v4l2_dev;
 
        ret = video_register_device(vfd, VFL_TYPE_GRABBER, 0);
        if (ret) {
index 4cc7f65d7d76d3ab32b205bb96bc4886a1744b75..6a17676f9d7227063fd4d22d9650d752e2695ba1 100644 (file)
@@ -1051,6 +1051,7 @@ static int m2mtest_probe(struct platform_device *pdev)
 
        *vfd = m2mtest_videodev;
        vfd->lock = &dev->dev_mutex;
+       vfd->v4l2_dev = &dev->v4l2_dev;
 
        ret = video_register_device(vfd, VFL_TYPE_GRABBER, 0);
        if (ret) {
@@ -1061,7 +1062,7 @@ static int m2mtest_probe(struct platform_device *pdev)
        video_set_drvdata(vfd, dev);
        snprintf(vfd->name, sizeof(vfd->name), "%s", m2mtest_videodev.name);
        dev->vfd = vfd;
-       v4l2_info(&dev->v4l2_dev, MEM2MEM_TEST_MODULE_NAME
+       v4l2_info(&dev->v4l2_dev,
                        "Device registered as /dev/video%d\n", vfd->num);
 
        setup_timer(&dev->timer, device_isr, (long)dev);
index f7440e585b6b7bd927a52882eda1abc2032878be..c690435853bdaf69f80d79567cb8f2ec8af967b8 100644 (file)
@@ -937,6 +937,7 @@ static int emmaprp_probe(struct platform_device *pdev)
 
        *vfd = emmaprp_videodev;
        vfd->lock = &pcdev->dev_mutex;
+       vfd->v4l2_dev = &pcdev->v4l2_dev;
 
        video_set_drvdata(vfd, pcdev);
        snprintf(vfd->name, sizeof(vfd->name), "%s", emmaprp_videodev.name);