aboutsummaryrefslogtreecommitdiffstats
path: root/sound
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2006-08-02 15:12:09 -0400
committerJaroslav Kysela <perex@suse.cz>2006-08-03 09:21:31 -0400
commit6cb53e7ed77d429531afa8d822d59909f953a771 (patch)
treeb855184d9fe5eb9f640d7de06563b82cc9e23dd3 /sound
parent264f9577a5a12de97aa85fa49dfd2788a4127e23 (diff)
[ALSA] Don't reject O_RDWR at opening PCM OSS with read/write-only device
Accept O_RDWR at opening a PCM OSS device that is read- or write-only, just for the compatibility with the behavior of older versions. Signed-off-by: Takashi Iwai <tiwai@suse.de> Signed-off-by: Jaroslav Kysela <perex@suse.cz>
Diffstat (limited to 'sound')
-rw-r--r--sound/core/oss/pcm_oss.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/sound/core/oss/pcm_oss.c b/sound/core/oss/pcm_oss.c
index f5ff4f4a16e..472fce0ee0e 100644
--- a/sound/core/oss/pcm_oss.c
+++ b/sound/core/oss/pcm_oss.c
@@ -2228,6 +2228,8 @@ static int snd_pcm_oss_open_file(struct file *file,
2228 for (idx = 0; idx < 2; idx++) { 2228 for (idx = 0; idx < 2; idx++) {
2229 if (setup[idx].disable) 2229 if (setup[idx].disable)
2230 continue; 2230 continue;
2231 if (! pcm->streams[idx].substream_count)
2232 continue; /* no matching substream */
2231 if (idx == SNDRV_PCM_STREAM_PLAYBACK) { 2233 if (idx == SNDRV_PCM_STREAM_PLAYBACK) {
2232 if (! (f_mode & FMODE_WRITE)) 2234 if (! (f_mode & FMODE_WRITE))
2233 continue; 2235 continue;