sound: rawmidi: fix opened substreams count
authorClemens Ladisch <clemens@ladisch.de>
Wed, 21 Oct 2009 07:12:26 +0000 (09:12 +0200)
committerTakashi Iwai <tiwai@suse.de>
Tue, 10 Nov 2009 15:32:10 +0000 (16:32 +0100)
commit91d12c485b8949cce6c13ab641147c5bc86ce8b9
tree2f5d3b031e1a3920561f514f5387890f7b4e1419
parent3f225c07c7d0559f65b41250edd01a577fdba426
sound: rawmidi: fix opened substreams count

The substream_opened field is to count the number of opened substreams,
not the number of times that any substreams have been opened.

Furthermore, all substreams being opened does not imply that the next
open would fail, due to the possibility of O_APPEND.  With this wrong
check, opening a substream multiple times would succeed only if the
device had more unopened substreams.

Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
sound/core/rawmidi.c