Commit dd0daf2a authored by Hans Verkuil's avatar Hans Verkuil Committed by Mauro Carvalho Chehab

V4L/DVB: v4l2-dev: remove unnecessary lock around atomic clear_bit

No need to lock when unregistering the device: clear_bit is already an
atomic operation.
Signed-off-by: default avatarHans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@redhat.com>
parent 0eed42e4
...@@ -600,9 +600,7 @@ void video_unregister_device(struct video_device *vdev) ...@@ -600,9 +600,7 @@ void video_unregister_device(struct video_device *vdev)
if (!vdev || !video_is_registered(vdev)) if (!vdev || !video_is_registered(vdev))
return; return;
mutex_lock(&videodev_lock);
clear_bit(V4L2_FL_REGISTERED, &vdev->flags); clear_bit(V4L2_FL_REGISTERED, &vdev->flags);
mutex_unlock(&videodev_lock);
device_unregister(&vdev->dev); device_unregister(&vdev->dev);
} }
EXPORT_SYMBOL(video_unregister_device); EXPORT_SYMBOL(video_unregister_device);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment