]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - drivers/media/video/cafe_ccic.c
V4L/DVB (8752): s2255drv: firmware improvement patch
[linux-2.6-omap-h63xx.git] / drivers / media / video / cafe_ccic.c
index 5405c30dbb041748b47941c5e9b0fd19842915c4..e9994c81df660ebaec7d9b9d10a587d73dfa3910 100644 (file)
@@ -1476,9 +1476,12 @@ static int cafe_v4l_open(struct inode *inode, struct file *filp)
 {
        struct cafe_camera *cam;
 
+       lock_kernel();
        cam = cafe_find_dev(iminor(inode));
-       if (cam == NULL)
+       if (cam == NULL) {
+               unlock_kernel();
                return -ENODEV;
+       }
        filp->private_data = cam;
 
        mutex_lock(&cam->s_mutex);
@@ -1490,6 +1493,7 @@ static int cafe_v4l_open(struct inode *inode, struct file *filp)
        }
        (cam->users)++;
        mutex_unlock(&cam->s_mutex);
+       unlock_kernel();
        return 0;
 }