Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 170058
b: refs/heads/master
c: 91d12c4
h: refs/heads/master
v: v3
  • Loading branch information
Clemens Ladisch authored and Takashi Iwai committed Nov 10, 2009
1 parent 05dac67 commit 50b3305
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 5 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: 3f225c07c7d0559f65b41250edd01a577fdba426
refs/heads/master: 91d12c485b8949cce6c13ab641147c5bc86ce8b9
6 changes: 2 additions & 4 deletions trunk/sound/core/rawmidi.c
Original file line number Diff line number Diff line change
Expand Up @@ -242,8 +242,6 @@ static int assign_substream(struct snd_rawmidi *rmidi, int subdevice,
return -ENXIO;
if (subdevice >= 0 && subdevice >= s->substream_count)
return -ENODEV;
if (s->substream_opened >= s->substream_count)
return -EAGAIN;

list_for_each_entry(substream, &s->substreams, list) {
if (substream->opened) {
Expand Down Expand Up @@ -280,9 +278,9 @@ static int open_substream(struct snd_rawmidi *rmidi,
substream->active_sensing = 0;
if (mode & SNDRV_RAWMIDI_LFLG_APPEND)
substream->append = 1;
rmidi->streams[substream->stream].substream_opened++;
}
substream->use_count++;
rmidi->streams[substream->stream].substream_opened++;
return 0;
}

Expand Down Expand Up @@ -466,7 +464,6 @@ static void close_substream(struct snd_rawmidi *rmidi,
struct snd_rawmidi_substream *substream,
int cleanup)
{
rmidi->streams[substream->stream].substream_opened--;
if (--substream->use_count)
return;

Expand All @@ -491,6 +488,7 @@ static void close_substream(struct snd_rawmidi *rmidi,
snd_rawmidi_runtime_free(substream);
substream->opened = 0;
substream->append = 0;
rmidi->streams[substream->stream].substream_opened--;
}

static void rawmidi_release_priv(struct snd_rawmidi_file *rfile)
Expand Down

0 comments on commit 50b3305

Please sign in to comment.