Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 43432
b: refs/heads/master
c: 7b900c1
h: refs/heads/master
v: v3
  • Loading branch information
Stefan Richter committed Dec 7, 2006
1 parent c1d287c commit 0280181
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 12 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 75dcf5dc5a0dc4e895944368780cc2fc40008a55
refs/heads/master: 7b900c12cd689e4372afe3904a03f98253546449
14 changes: 3 additions & 11 deletions trunk/drivers/ieee1394/dv1394.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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;
}

Expand Down

0 comments on commit 0280181

Please sign in to comment.