]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - drivers/media/video/stradis.c
V4L/DVB (8752): s2255drv: firmware improvement patch
[linux-2.6-omap-h63xx.git] / drivers / media / video / stradis.c
index 276bded06ab3eb9ac9b7f9414000b1918d81ce24..a3cbe9be3c15e363eab265575505846d78a0d0a2 100644 (file)
@@ -1882,12 +1882,16 @@ static int saa_open(struct inode *inode, struct file *file)
        struct video_device *vdev = video_devdata(file);
        struct saa7146 *saa = container_of(vdev, struct saa7146, video_dev);
 
+       lock_kernel();
        file->private_data = saa;
 
        saa->user++;
-       if (saa->user > 1)
+       if (saa->user > 1) {
+               unlock_kernel();
                return 0;       /* device open already, don't reset */
+       }
        saa->writemode = VID_WRITE_MPEG_VID;    /* default to video */
+       unlock_kernel();
        return 0;
 }