|
@@ -1656,7 +1656,7 @@ static int omap24xxcam_device_register(struct v4l2_int_device *s)
|
|
|
}
|
|
|
vfd->release = video_device_release;
|
|
|
|
|
|
- vfd->parent = cam->dev;
|
|
|
+ vfd->v4l2_dev = &cam->v4l2_dev;
|
|
|
|
|
|
strlcpy(vfd->name, CAM_NAME, sizeof(vfd->name));
|
|
|
vfd->fops = &omap24xxcam_fops;
|
|
@@ -1752,6 +1752,11 @@ static int omap24xxcam_probe(struct platform_device *pdev)
|
|
|
|
|
|
cam->dev = &pdev->dev;
|
|
|
|
|
|
+ if (v4l2_device_register(&pdev->dev, &cam->v4l2_dev)) {
|
|
|
+ dev_err(&pdev->dev, "v4l2_device_register failed\n");
|
|
|
+ goto err;
|
|
|
+ }
|
|
|
+
|
|
|
/*
|
|
|
* Impose a lower limit on the amount of memory allocated for
|
|
|
* capture. We require at least enough memory to double-buffer
|
|
@@ -1849,6 +1854,8 @@ static int omap24xxcam_remove(struct platform_device *pdev)
|
|
|
cam->mmio_base_phys = 0;
|
|
|
}
|
|
|
|
|
|
+ v4l2_device_unregister(&cam->v4l2_dev);
|
|
|
+
|
|
|
kfree(cam);
|
|
|
|
|
|
return 0;
|