mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-08-30 12:13:51 -04:00
media: em28xx: use vb2_video_unregister_device
Use vb2_video_unregister_device instead of video_unregister_device to ensure any streaming is correctly stopped at unregister time. Signed-off-by: Hans Verkuil <hverkuil+cisco@kernel.org> Tested-by: Hans Verkuil <hverkuil+cisco@kernel.org> Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
This commit is contained in:
committed by
Mauro Carvalho Chehab
parent
de626073df
commit
7c8bf63b79
@@ -2402,17 +2402,17 @@ static int em28xx_v4l2_fini(struct em28xx *dev)
|
||||
if (video_is_registered(&v4l2->radio_dev)) {
|
||||
dev_info(&dev->intf->dev, "V4L2 device %s deregistered\n",
|
||||
video_device_node_name(&v4l2->radio_dev));
|
||||
video_unregister_device(&v4l2->radio_dev);
|
||||
vb2_video_unregister_device(&v4l2->radio_dev);
|
||||
}
|
||||
if (video_is_registered(&v4l2->vbi_dev)) {
|
||||
dev_info(&dev->intf->dev, "V4L2 device %s deregistered\n",
|
||||
video_device_node_name(&v4l2->vbi_dev));
|
||||
video_unregister_device(&v4l2->vbi_dev);
|
||||
vb2_video_unregister_device(&v4l2->vbi_dev);
|
||||
}
|
||||
if (video_is_registered(&v4l2->vdev)) {
|
||||
dev_info(&dev->intf->dev, "V4L2 device %s deregistered\n",
|
||||
video_device_node_name(&v4l2->vdev));
|
||||
video_unregister_device(&v4l2->vdev);
|
||||
vb2_video_unregister_device(&v4l2->vdev);
|
||||
}
|
||||
|
||||
mutex_unlock(&dev->lock);
|
||||
@@ -3068,19 +3068,19 @@ static int em28xx_v4l2_init(struct em28xx *dev)
|
||||
dev_info(&dev->intf->dev,
|
||||
"V4L2 device %s deregistered\n",
|
||||
video_device_node_name(&v4l2->radio_dev));
|
||||
video_unregister_device(&v4l2->radio_dev);
|
||||
vb2_video_unregister_device(&v4l2->radio_dev);
|
||||
}
|
||||
if (video_is_registered(&v4l2->vbi_dev)) {
|
||||
dev_info(&dev->intf->dev,
|
||||
"V4L2 device %s deregistered\n",
|
||||
video_device_node_name(&v4l2->vbi_dev));
|
||||
video_unregister_device(&v4l2->vbi_dev);
|
||||
vb2_video_unregister_device(&v4l2->vbi_dev);
|
||||
}
|
||||
if (video_is_registered(&v4l2->vdev)) {
|
||||
dev_info(&dev->intf->dev,
|
||||
"V4L2 device %s deregistered\n",
|
||||
video_device_node_name(&v4l2->vdev));
|
||||
video_unregister_device(&v4l2->vdev);
|
||||
vb2_video_unregister_device(&v4l2->vdev);
|
||||
}
|
||||
|
||||
mutex_unlock(&dev->lock);
|
||||
|
||||
Reference in New Issue
Block a user