aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/video/saa7134
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/media/video/saa7134')
-rw-r--r--drivers/media/video/saa7134/saa7134-empress.c3
-rw-r--r--drivers/media/video/saa7134/saa7134-video.c8
2 files changed, 10 insertions, 1 deletions
diff --git a/drivers/media/video/saa7134/saa7134-empress.c b/drivers/media/video/saa7134/saa7134-empress.c
index c0c5d7509c25..6f423d116fb4 100644
--- a/drivers/media/video/saa7134/saa7134-empress.c
+++ b/drivers/media/video/saa7134/saa7134-empress.c
@@ -79,9 +79,11 @@ static int ts_open(struct inode *inode, struct file *file)
79 struct saa7134_dev *dev; 79 struct saa7134_dev *dev;
80 int err; 80 int err;
81 81
82 lock_kernel();
82 list_for_each_entry(dev, &saa7134_devlist, devlist) 83 list_for_each_entry(dev, &saa7134_devlist, devlist)
83 if (dev->empress_dev && dev->empress_dev->minor == minor) 84 if (dev->empress_dev && dev->empress_dev->minor == minor)
84 goto found; 85 goto found;
86 unlock_kernel();
85 return -ENODEV; 87 return -ENODEV;
86 found: 88 found:
87 89
@@ -103,6 +105,7 @@ static int ts_open(struct inode *inode, struct file *file)
103done_up: 105done_up:
104 mutex_unlock(&dev->empress_tsq.vb_lock); 106 mutex_unlock(&dev->empress_tsq.vb_lock);
105done: 107done:
108 unlock_kernel();
106 return err; 109 return err;
107} 110}
108 111
diff --git a/drivers/media/video/saa7134/saa7134-video.c b/drivers/media/video/saa7134/saa7134-video.c
index 68c268981861..8fd31138f9ad 100644
--- a/drivers/media/video/saa7134/saa7134-video.c
+++ b/drivers/media/video/saa7134/saa7134-video.c
@@ -1330,6 +1330,8 @@ static int video_open(struct inode *inode, struct file *file)
1330 struct saa7134_fh *fh; 1330 struct saa7134_fh *fh;
1331 enum v4l2_buf_type type = V4L2_BUF_TYPE_VIDEO_CAPTURE; 1331 enum v4l2_buf_type type = V4L2_BUF_TYPE_VIDEO_CAPTURE;
1332 int radio = 0; 1332 int radio = 0;
1333
1334 lock_kernel();
1333 list_for_each_entry(dev, &saa7134_devlist, devlist) { 1335 list_for_each_entry(dev, &saa7134_devlist, devlist) {
1334 if (dev->video_dev && (dev->video_dev->minor == minor)) 1336 if (dev->video_dev && (dev->video_dev->minor == minor))
1335 goto found; 1337 goto found;
@@ -1342,6 +1344,7 @@ static int video_open(struct inode *inode, struct file *file)
1342 goto found; 1344 goto found;
1343 } 1345 }
1344 } 1346 }
1347 unlock_kernel();
1345 return -ENODEV; 1348 return -ENODEV;
1346 found: 1349 found:
1347 1350
@@ -1350,8 +1353,10 @@ static int video_open(struct inode *inode, struct file *file)
1350 1353
1351 /* allocate + initialize per filehandle data */ 1354 /* allocate + initialize per filehandle data */
1352 fh = kzalloc(sizeof(*fh),GFP_KERNEL); 1355 fh = kzalloc(sizeof(*fh),GFP_KERNEL);
1353 if (NULL == fh) 1356 if (NULL == fh) {
1357 unlock_kernel();
1354 return -ENOMEM; 1358 return -ENOMEM;
1359 }
1355 file->private_data = fh; 1360 file->private_data = fh;
1356 fh->dev = dev; 1361 fh->dev = dev;
1357 fh->radio = radio; 1362 fh->radio = radio;
@@ -1384,6 +1389,7 @@ static int video_open(struct inode *inode, struct file *file)
1384 /* switch to video/vbi mode */ 1389 /* switch to video/vbi mode */
1385 video_mux(dev,dev->ctl_input); 1390 video_mux(dev,dev->ctl_input);
1386 } 1391 }
1392 unlock_kernel();
1387 return 0; 1393 return 0;
1388} 1394}
1389 1395