diff options
author | Hans Verkuil <hans.verkuil@cisco.com> | 2013-06-27 01:44:04 -0400 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2013-06-28 14:09:43 -0400 |
commit | 8f484d8767d3d80bc20bb341a4b3e35894ef704b (patch) | |
tree | c0906f1dc6e8fd25644fc787bead2b8906a04b6e /drivers/media | |
parent | ae09e9e73a7d59bf0f8cc92e51c51abbd4cab732 (diff) |
[media] mem2mem: set missing v4l2_dev pointer
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>
Diffstat (limited to 'drivers/media')
-rw-r--r-- | drivers/media/platform/m2m-deinterlace.c | 1 | ||||
-rw-r--r-- | drivers/media/platform/mem2mem_testdev.c | 3 | ||||
-rw-r--r-- | drivers/media/platform/mx2_emmaprp.c | 1 |
3 files changed, 4 insertions, 1 deletions
diff --git a/drivers/media/platform/m2m-deinterlace.c b/drivers/media/platform/m2m-deinterlace.c index 758564649589..540516ca872c 100644 --- a/drivers/media/platform/m2m-deinterlace.c +++ b/drivers/media/platform/m2m-deinterlace.c | |||
@@ -1033,6 +1033,7 @@ static int deinterlace_probe(struct platform_device *pdev) | |||
1033 | 1033 | ||
1034 | *vfd = deinterlace_videodev; | 1034 | *vfd = deinterlace_videodev; |
1035 | vfd->lock = &pcdev->dev_mutex; | 1035 | vfd->lock = &pcdev->dev_mutex; |
1036 | vfd->v4l2_dev = &pcdev->v4l2_dev; | ||
1036 | 1037 | ||
1037 | ret = video_register_device(vfd, VFL_TYPE_GRABBER, 0); | 1038 | ret = video_register_device(vfd, VFL_TYPE_GRABBER, 0); |
1038 | if (ret) { | 1039 | if (ret) { |
diff --git a/drivers/media/platform/mem2mem_testdev.c b/drivers/media/platform/mem2mem_testdev.c index 4cc7f65d7d76..6a17676f9d72 100644 --- a/drivers/media/platform/mem2mem_testdev.c +++ b/drivers/media/platform/mem2mem_testdev.c | |||
@@ -1051,6 +1051,7 @@ static int m2mtest_probe(struct platform_device *pdev) | |||
1051 | 1051 | ||
1052 | *vfd = m2mtest_videodev; | 1052 | *vfd = m2mtest_videodev; |
1053 | vfd->lock = &dev->dev_mutex; | 1053 | vfd->lock = &dev->dev_mutex; |
1054 | vfd->v4l2_dev = &dev->v4l2_dev; | ||
1054 | 1055 | ||
1055 | ret = video_register_device(vfd, VFL_TYPE_GRABBER, 0); | 1056 | ret = video_register_device(vfd, VFL_TYPE_GRABBER, 0); |
1056 | if (ret) { | 1057 | if (ret) { |
@@ -1061,7 +1062,7 @@ static int m2mtest_probe(struct platform_device *pdev) | |||
1061 | video_set_drvdata(vfd, dev); | 1062 | video_set_drvdata(vfd, dev); |
1062 | snprintf(vfd->name, sizeof(vfd->name), "%s", m2mtest_videodev.name); | 1063 | snprintf(vfd->name, sizeof(vfd->name), "%s", m2mtest_videodev.name); |
1063 | dev->vfd = vfd; | 1064 | dev->vfd = vfd; |
1064 | v4l2_info(&dev->v4l2_dev, MEM2MEM_TEST_MODULE_NAME | 1065 | v4l2_info(&dev->v4l2_dev, |
1065 | "Device registered as /dev/video%d\n", vfd->num); | 1066 | "Device registered as /dev/video%d\n", vfd->num); |
1066 | 1067 | ||
1067 | setup_timer(&dev->timer, device_isr, (long)dev); | 1068 | setup_timer(&dev->timer, device_isr, (long)dev); |
diff --git a/drivers/media/platform/mx2_emmaprp.c b/drivers/media/platform/mx2_emmaprp.c index f7440e585b6b..c690435853bd 100644 --- a/drivers/media/platform/mx2_emmaprp.c +++ b/drivers/media/platform/mx2_emmaprp.c | |||
@@ -937,6 +937,7 @@ static int emmaprp_probe(struct platform_device *pdev) | |||
937 | 937 | ||
938 | *vfd = emmaprp_videodev; | 938 | *vfd = emmaprp_videodev; |
939 | vfd->lock = &pcdev->dev_mutex; | 939 | vfd->lock = &pcdev->dev_mutex; |
940 | vfd->v4l2_dev = &pcdev->v4l2_dev; | ||
940 | 941 | ||
941 | video_set_drvdata(vfd, pcdev); | 942 | video_set_drvdata(vfd, pcdev); |
942 | snprintf(vfd->name, sizeof(vfd->name), "%s", emmaprp_videodev.name); | 943 | snprintf(vfd->name, sizeof(vfd->name), "%s", emmaprp_videodev.name); |