Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 206664
b: refs/heads/master
c: 171d9f7
h: refs/heads/master
v: v3
  • Loading branch information
John Kacur authored and Takashi Iwai committed Jul 5, 2010
1 parent a0066f8 commit ef56689
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 6 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: 65ee2ba3105f6ca3b8814d993682d4f21a1f0d8d
refs/heads/master: 171d9f7d786681e76bb289d01d8f897cbc50de57
13 changes: 8 additions & 5 deletions trunk/sound/sound_core.c
Original file line number Diff line number Diff line change
Expand Up @@ -576,8 +576,6 @@ static int soundcore_open(struct inode *inode, struct file *file)
struct sound_unit *s;
const struct file_operations *new_fops = NULL;

lock_kernel ();

chain=unit&0x0F;
if(chain==4 || chain==5) /* dsp/audio/dsp16 */
{
Expand Down Expand Up @@ -630,18 +628,23 @@ static int soundcore_open(struct inode *inode, struct file *file)
const struct file_operations *old_fops = file->f_op;
file->f_op = new_fops;
spin_unlock(&sound_loader_lock);
if(file->f_op->open)

if (file->f_op->open) {
/* TODO: push down BKL into indivial open functions */
lock_kernel();
err = file->f_op->open(inode,file);
unlock_kernel();
}

if (err) {
fops_put(file->f_op);
file->f_op = fops_get(old_fops);
}

fops_put(old_fops);
unlock_kernel();
return err;
}
spin_unlock(&sound_loader_lock);
unlock_kernel();
return -ENODEV;
}

Expand Down

0 comments on commit ef56689

Please sign in to comment.