summaryrefslogtreecommitdiffstats
path: root/drivers/ieee1394/dv1394.c
diff options
context:
space:
mode:
authorStefan Richter <stefanr@s5r6.in-berlin.de>2006-10-20 21:01:58 +0200
committerStefan Richter <stefanr@s5r6.in-berlin.de>2006-12-07 21:31:38 +0100
commit7b900c12cd689e4372afe3904a03f98253546449 (patch)
treedf2d71bb71627059e065451bf2c7af734ecd15a3 /drivers/ieee1394/dv1394.c
parent75dcf5dc5a0dc4e895944368780cc2fc40008a55 (diff)
downloadtalos-obmc-linux-7b900c12cd689e4372afe3904a03f98253546449.tar.gz
talos-obmc-linux-7b900c12cd689e4372afe3904a03f98253546449.zip
dv1394: remove BKL contention
Purges the one remaining call to lock_kernel() from the 1394 subsystem. Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
Diffstat (limited to 'drivers/ieee1394/dv1394.c')
-rw-r--r--drivers/ieee1394/dv1394.c14
1 files changed, 3 insertions, 11 deletions
diff --git a/drivers/ieee1394/dv1394.c b/drivers/ieee1394/dv1394.c
index 6c72f04b2b5d..d0e11c176c3b 100644
--- a/drivers/ieee1394/dv1394.c
+++ b/drivers/ieee1394/dv1394.c
@@ -1536,27 +1536,20 @@ static ssize_t dv1394_read(struct file *file, char __user *buffer, size_t count
static long dv1394_ioctl(struct file *file, unsigned int cmd, unsigned long arg)
{
- struct video_card *video;
+ struct video_card *video = file_to_video_card(file);
unsigned long flags;
int ret = -EINVAL;
void __user *argp = (void __user *)arg;
DECLARE_WAITQUEUE(wait, current);
- lock_kernel();
- video = file_to_video_card(file);
-
/* serialize this to prevent multi-threaded mayhem */
if (file->f_flags & O_NONBLOCK) {
- if (!mutex_trylock(&video->mtx)) {
- unlock_kernel();
+ if (!mutex_trylock(&video->mtx))
return -EAGAIN;
- }
} else {
- if (mutex_lock_interruptible(&video->mtx)) {
- unlock_kernel();
+ if (mutex_lock_interruptible(&video->mtx))
return -ERESTARTSYS;
- }
}
switch(cmd)
@@ -1780,7 +1773,6 @@ static long dv1394_ioctl(struct file *file, unsigned int cmd, unsigned long arg)
out:
mutex_unlock(&video->mtx);
- unlock_kernel();
return ret;
}
OpenPOWER on IntegriCloud