Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 34861
b: refs/heads/master
c: 2529bba
h: refs/heads/master
i:
  34859: a7fddb1
v: v3
  • Loading branch information
Takashi Iwai authored and Jaroslav Kysela committed Sep 23, 2006
1 parent 6a7d128 commit f4f9fc9
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 3 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: f03d68fe343d70bb06ecdb3d70dcf0e678ed99f9
refs/heads/master: 2529bba7606b23c1b7161d3c2ad486162e8650f9
2 changes: 2 additions & 0 deletions trunk/sound/core/control.c
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,8 @@ static int snd_ctl_open(struct inode *inode, struct file *file)
init_waitqueue_head(&ctl->change_sleep);
spin_lock_init(&ctl->read_lock);
ctl->card = card;
ctl->prefer_pcm_subdevice = -1;
ctl->prefer_rawmidi_subdevice = -1;
ctl->pid = current->pid;
file->private_data = ctl;
write_lock_irqsave(&card->ctl_files_rwlock, flags);
Expand Down
3 changes: 2 additions & 1 deletion trunk/sound/core/pcm.c
Original file line number Diff line number Diff line change
Expand Up @@ -792,7 +792,8 @@ int snd_pcm_attach_substream(struct snd_pcm *pcm, int stream,
kctl = snd_ctl_file(list);
if (kctl->pid == current->pid) {
prefer_subdevice = kctl->prefer_pcm_subdevice;
break;
if (prefer_subdevice != -1)
break;
}
}
up_read(&card->controls_rwsem);
Expand Down
3 changes: 2 additions & 1 deletion trunk/sound/core/rawmidi.c
Original file line number Diff line number Diff line change
Expand Up @@ -430,7 +430,8 @@ static int snd_rawmidi_open(struct inode *inode, struct file *file)
kctl = snd_ctl_file(list);
if (kctl->pid == current->pid) {
subdevice = kctl->prefer_rawmidi_subdevice;
break;
if (subdevice != -1)
break;
}
}
up_read(&card->controls_rwsem);
Expand Down

0 comments on commit f4f9fc9

Please sign in to comment.