[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>
This commit is contained in:
parent
ae09e9e73a
commit
8f484d8767
@ -1033,6 +1033,7 @@ static int deinterlace_probe(struct platform_device *pdev)
|
|||||||
|
|
||||||
*vfd = deinterlace_videodev;
|
*vfd = deinterlace_videodev;
|
||||||
vfd->lock = &pcdev->dev_mutex;
|
vfd->lock = &pcdev->dev_mutex;
|
||||||
|
vfd->v4l2_dev = &pcdev->v4l2_dev;
|
||||||
|
|
||||||
ret = video_register_device(vfd, VFL_TYPE_GRABBER, 0);
|
ret = video_register_device(vfd, VFL_TYPE_GRABBER, 0);
|
||||||
if (ret) {
|
if (ret) {
|
||||||
|
@ -1051,6 +1051,7 @@ static int m2mtest_probe(struct platform_device *pdev)
|
|||||||
|
|
||||||
*vfd = m2mtest_videodev;
|
*vfd = m2mtest_videodev;
|
||||||
vfd->lock = &dev->dev_mutex;
|
vfd->lock = &dev->dev_mutex;
|
||||||
|
vfd->v4l2_dev = &dev->v4l2_dev;
|
||||||
|
|
||||||
ret = video_register_device(vfd, VFL_TYPE_GRABBER, 0);
|
ret = video_register_device(vfd, VFL_TYPE_GRABBER, 0);
|
||||||
if (ret) {
|
if (ret) {
|
||||||
@ -1061,7 +1062,7 @@ static int m2mtest_probe(struct platform_device *pdev)
|
|||||||
video_set_drvdata(vfd, dev);
|
video_set_drvdata(vfd, dev);
|
||||||
snprintf(vfd->name, sizeof(vfd->name), "%s", m2mtest_videodev.name);
|
snprintf(vfd->name, sizeof(vfd->name), "%s", m2mtest_videodev.name);
|
||||||
dev->vfd = vfd;
|
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);
|
"Device registered as /dev/video%d\n", vfd->num);
|
||||||
|
|
||||||
setup_timer(&dev->timer, device_isr, (long)dev);
|
setup_timer(&dev->timer, device_isr, (long)dev);
|
||||||
|
@ -937,6 +937,7 @@ static int emmaprp_probe(struct platform_device *pdev)
|
|||||||
|
|
||||||
*vfd = emmaprp_videodev;
|
*vfd = emmaprp_videodev;
|
||||||
vfd->lock = &pcdev->dev_mutex;
|
vfd->lock = &pcdev->dev_mutex;
|
||||||
|
vfd->v4l2_dev = &pcdev->v4l2_dev;
|
||||||
|
|
||||||
video_set_drvdata(vfd, pcdev);
|
video_set_drvdata(vfd, pcdev);
|
||||||
snprintf(vfd->name, sizeof(vfd->name), "%s", emmaprp_videodev.name);
|
snprintf(vfd->name, sizeof(vfd->name), "%s", emmaprp_videodev.name);
|
||||||
|
Loading…
Reference in New Issue
Block a user