diff mbox

[FOR,2.6.37] Revert "V4L/DVB: v4l2-dev: remove unnecessary lock around atomic clear_bit"

Message ID 1290421287-7123-1-git-send-email-laurent.pinchart@ideasonboard.com (mailing list archive)
State Accepted
Headers show

Commit Message

Laurent Pinchart Nov. 22, 2010, 10:21 a.m. UTC
None
diff mbox

Patch

diff --git a/drivers/media/video/v4l2-dev.c b/drivers/media/video/v4l2-dev.c
index 03f7f46..f777da6 100644
--- a/drivers/media/video/v4l2-dev.c
+++ b/drivers/media/video/v4l2-dev.c
@@ -596,7 +596,9 @@  void video_unregister_device(struct video_device *vdev)
 	if (!vdev || !video_is_registered(vdev))
 		return;
 
+	mutex_lock(&videodev_lock);
 	clear_bit(V4L2_FL_REGISTERED, &vdev->flags);
+	mutex_unlock(&videodev_lock);
 	device_unregister(&vdev->dev);
 }
 EXPORT_SYMBOL(video_unregister_device);