diff options
-rw-r--r-- | drivers/media/platform/omap24xxcam.c | 9 | ||||
-rw-r--r-- | drivers/media/platform/omap24xxcam.h | 3 |
2 files changed, 11 insertions, 1 deletions
diff --git a/drivers/media/platform/omap24xxcam.c b/drivers/media/platform/omap24xxcam.c index debb44ceb185..d2b440c842b3 100644 --- a/drivers/media/platform/omap24xxcam.c +++ b/drivers/media/platform/omap24xxcam.c | |||
@@ -1656,7 +1656,7 @@ static int omap24xxcam_device_register(struct v4l2_int_device *s) | |||
1656 | } | 1656 | } |
1657 | vfd->release = video_device_release; | 1657 | vfd->release = video_device_release; |
1658 | 1658 | ||
1659 | vfd->parent = cam->dev; | 1659 | vfd->v4l2_dev = &cam->v4l2_dev; |
1660 | 1660 | ||
1661 | strlcpy(vfd->name, CAM_NAME, sizeof(vfd->name)); | 1661 | strlcpy(vfd->name, CAM_NAME, sizeof(vfd->name)); |
1662 | vfd->fops = &omap24xxcam_fops; | 1662 | vfd->fops = &omap24xxcam_fops; |
@@ -1752,6 +1752,11 @@ static int omap24xxcam_probe(struct platform_device *pdev) | |||
1752 | 1752 | ||
1753 | cam->dev = &pdev->dev; | 1753 | cam->dev = &pdev->dev; |
1754 | 1754 | ||
1755 | if (v4l2_device_register(&pdev->dev, &cam->v4l2_dev)) { | ||
1756 | dev_err(&pdev->dev, "v4l2_device_register failed\n"); | ||
1757 | goto err; | ||
1758 | } | ||
1759 | |||
1755 | /* | 1760 | /* |
1756 | * Impose a lower limit on the amount of memory allocated for | 1761 | * Impose a lower limit on the amount of memory allocated for |
1757 | * capture. We require at least enough memory to double-buffer | 1762 | * capture. We require at least enough memory to double-buffer |
@@ -1849,6 +1854,8 @@ static int omap24xxcam_remove(struct platform_device *pdev) | |||
1849 | cam->mmio_base_phys = 0; | 1854 | cam->mmio_base_phys = 0; |
1850 | } | 1855 | } |
1851 | 1856 | ||
1857 | v4l2_device_unregister(&cam->v4l2_dev); | ||
1858 | |||
1852 | kfree(cam); | 1859 | kfree(cam); |
1853 | 1860 | ||
1854 | return 0; | 1861 | return 0; |
diff --git a/drivers/media/platform/omap24xxcam.h b/drivers/media/platform/omap24xxcam.h index c4395956a493..7f6f79155537 100644 --- a/drivers/media/platform/omap24xxcam.h +++ b/drivers/media/platform/omap24xxcam.h | |||
@@ -29,6 +29,7 @@ | |||
29 | 29 | ||
30 | #include <media/videobuf-dma-sg.h> | 30 | #include <media/videobuf-dma-sg.h> |
31 | #include <media/v4l2-int-device.h> | 31 | #include <media/v4l2-int-device.h> |
32 | #include <media/v4l2-device.h> | ||
32 | 33 | ||
33 | /* | 34 | /* |
34 | * | 35 | * |
@@ -462,6 +463,8 @@ struct omap24xxcam_device { | |||
462 | */ | 463 | */ |
463 | struct mutex mutex; | 464 | struct mutex mutex; |
464 | 465 | ||
466 | struct v4l2_device v4l2_dev; | ||
467 | |||
465 | /*** general driver state information ***/ | 468 | /*** general driver state information ***/ |
466 | atomic_t users; | 469 | atomic_t users; |
467 | /* | 470 | /* |