aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/video/stradis.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/media/video/stradis.c')
-rw-r--r--drivers/media/video/stradis.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/drivers/media/video/stradis.c b/drivers/media/video/stradis.c
index 276bded06ab3..a3cbe9be3c15 100644
--- a/drivers/media/video/stradis.c
+++ b/drivers/media/video/stradis.c
@@ -1882,12 +1882,16 @@ static int saa_open(struct inode *inode, struct file *file)
1882 struct video_device *vdev = video_devdata(file); 1882 struct video_device *vdev = video_devdata(file);
1883 struct saa7146 *saa = container_of(vdev, struct saa7146, video_dev); 1883 struct saa7146 *saa = container_of(vdev, struct saa7146, video_dev);
1884 1884
1885 lock_kernel();
1885 file->private_data = saa; 1886 file->private_data = saa;
1886 1887
1887 saa->user++; 1888 saa->user++;
1888 if (saa->user > 1) 1889 if (saa->user > 1) {
1890 unlock_kernel();
1889 return 0; /* device open already, don't reset */ 1891 return 0; /* device open already, don't reset */
1892 }
1890 saa->writemode = VID_WRITE_MPEG_VID; /* default to video */ 1893 saa->writemode = VID_WRITE_MPEG_VID; /* default to video */
1894 unlock_kernel();
1891 return 0; 1895 return 0;
1892} 1896}
1893 1897