|
@@ -2316,7 +2316,7 @@ vpfe_async_bound(struct v4l2_async_notifier *notifier,
|
|
return -EINVAL;
|
|
return -EINVAL;
|
|
}
|
|
}
|
|
|
|
|
|
- vpfe->video_dev->tvnorms |= sdinfo->inputs[0].std;
|
|
|
|
|
|
+ vpfe->video_dev.tvnorms |= sdinfo->inputs[0].std;
|
|
|
|
|
|
/* setup the supported formats & indexes */
|
|
/* setup the supported formats & indexes */
|
|
for (j = 0, i = 0; ; ++j) {
|
|
for (j = 0, i = 0; ; ++j) {
|
|
@@ -2389,9 +2389,9 @@ static int vpfe_probe_complete(struct vpfe_device *vpfe)
|
|
|
|
|
|
INIT_LIST_HEAD(&vpfe->dma_queue);
|
|
INIT_LIST_HEAD(&vpfe->dma_queue);
|
|
|
|
|
|
- vdev = vpfe->video_dev;
|
|
|
|
|
|
+ vdev = &vpfe->video_dev;
|
|
strlcpy(vdev->name, VPFE_MODULE_NAME, sizeof(vdev->name));
|
|
strlcpy(vdev->name, VPFE_MODULE_NAME, sizeof(vdev->name));
|
|
- vdev->release = video_device_release;
|
|
|
|
|
|
+ vdev->release = video_device_release_empty;
|
|
vdev->fops = &vpfe_fops;
|
|
vdev->fops = &vpfe_fops;
|
|
vdev->ioctl_ops = &vpfe_ioctl_ops;
|
|
vdev->ioctl_ops = &vpfe_ioctl_ops;
|
|
vdev->v4l2_dev = &vpfe->v4l2_dev;
|
|
vdev->v4l2_dev = &vpfe->v4l2_dev;
|
|
@@ -2399,7 +2399,7 @@ static int vpfe_probe_complete(struct vpfe_device *vpfe)
|
|
vdev->queue = q;
|
|
vdev->queue = q;
|
|
vdev->lock = &vpfe->lock;
|
|
vdev->lock = &vpfe->lock;
|
|
video_set_drvdata(vdev, vpfe);
|
|
video_set_drvdata(vdev, vpfe);
|
|
- err = video_register_device(vpfe->video_dev, VFL_TYPE_GRABBER, -1);
|
|
|
|
|
|
+ err = video_register_device(&vpfe->video_dev, VFL_TYPE_GRABBER, -1);
|
|
if (err) {
|
|
if (err) {
|
|
vpfe_err(vpfe,
|
|
vpfe_err(vpfe,
|
|
"Unable to register video device.\n");
|
|
"Unable to register video device.\n");
|
|
@@ -2565,17 +2565,11 @@ static int vpfe_probe(struct platform_device *pdev)
|
|
return -EINVAL;
|
|
return -EINVAL;
|
|
}
|
|
}
|
|
|
|
|
|
- vpfe->video_dev = video_device_alloc();
|
|
|
|
- if (!vpfe->video_dev) {
|
|
|
|
- dev_err(&pdev->dev, "Unable to allocate video device\n");
|
|
|
|
- return -ENOMEM;
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
ret = v4l2_device_register(&pdev->dev, &vpfe->v4l2_dev);
|
|
ret = v4l2_device_register(&pdev->dev, &vpfe->v4l2_dev);
|
|
if (ret) {
|
|
if (ret) {
|
|
vpfe_err(vpfe,
|
|
vpfe_err(vpfe,
|
|
"Unable to register v4l2 device.\n");
|
|
"Unable to register v4l2 device.\n");
|
|
- goto probe_out_video_release;
|
|
|
|
|
|
+ return ret;
|
|
}
|
|
}
|
|
|
|
|
|
/* set the driver data in platform device */
|
|
/* set the driver data in platform device */
|
|
@@ -2613,9 +2607,6 @@ static int vpfe_probe(struct platform_device *pdev)
|
|
|
|
|
|
probe_out_v4l2_unregister:
|
|
probe_out_v4l2_unregister:
|
|
v4l2_device_unregister(&vpfe->v4l2_dev);
|
|
v4l2_device_unregister(&vpfe->v4l2_dev);
|
|
-probe_out_video_release:
|
|
|
|
- if (!video_is_registered(vpfe->video_dev))
|
|
|
|
- video_device_release(vpfe->video_dev);
|
|
|
|
return ret;
|
|
return ret;
|
|
}
|
|
}
|
|
|
|
|
|
@@ -2632,7 +2623,7 @@ static int vpfe_remove(struct platform_device *pdev)
|
|
|
|
|
|
v4l2_async_notifier_unregister(&vpfe->notifier);
|
|
v4l2_async_notifier_unregister(&vpfe->notifier);
|
|
v4l2_device_unregister(&vpfe->v4l2_dev);
|
|
v4l2_device_unregister(&vpfe->v4l2_dev);
|
|
- video_unregister_device(vpfe->video_dev);
|
|
|
|
|
|
+ video_unregister_device(&vpfe->video_dev);
|
|
|
|
|
|
return 0;
|
|
return 0;
|
|
}
|
|
}
|