Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input
[pandora-kernel.git] / drivers / media / video / v4l2-dev.c
index 7090699..0ca7ec9 100644 (file)
@@ -421,6 +421,10 @@ static int __video_register_device(struct video_device *vdev, int type, int nr,
        if (!vdev->release)
                return -EINVAL;
 
+       /* v4l2_fh support */
+       spin_lock_init(&vdev->fh_lock);
+       INIT_LIST_HEAD(&vdev->fh_list);
+
        /* Part 1: check device type */
        switch (type) {
        case VFL_TYPE_GRABBER:
@@ -596,9 +600,7 @@ 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);