diff options
| author | Jeff Garzik <jeff@garzik.org> | 2006-04-14 20:48:55 -0400 |
|---|---|---|
| committer | Jeff Garzik <jeff@garzik.org> | 2006-04-14 20:48:55 -0400 |
| commit | 2acab771b7e676125cb8c96b61dcdefe9ba67e57 (patch) | |
| tree | 86227af3c9ad0d90823e5488a86f7f453ed1837a /sound/core/oss/pcm_oss.c | |
| parent | 201e06279823c73242de987f192f43d2b30e5331 (diff) | |
| parent | 64541d19702cfdb7ea946fdc20faee849f6874b1 (diff) | |
Merge branch 'master'
Diffstat (limited to 'sound/core/oss/pcm_oss.c')
| -rw-r--r-- | sound/core/oss/pcm_oss.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/sound/core/oss/pcm_oss.c b/sound/core/oss/pcm_oss.c index 91114c7aeff..c5978d6c608 100644 --- a/sound/core/oss/pcm_oss.c +++ b/sound/core/oss/pcm_oss.c @@ -1682,7 +1682,7 @@ static void snd_pcm_oss_init_substream(struct snd_pcm_substream *substream, substream->oss.setup = *setup; if (setup->nonblock) substream->ffile->f_flags |= O_NONBLOCK; - else + else if (setup->block) substream->ffile->f_flags &= ~O_NONBLOCK; runtime = substream->runtime; runtime->oss.params = 1; @@ -1757,10 +1757,11 @@ static int snd_pcm_oss_open_file(struct file *file, } pcm_oss_file->streams[idx] = substream; + substream->file = pcm_oss_file; snd_pcm_oss_init_substream(substream, &setup[idx], minor); } - if (! pcm_oss_file->streams[0] && pcm_oss_file->streams[1]) { + if (!pcm_oss_file->streams[0] && !pcm_oss_file->streams[1]) { snd_pcm_oss_release_file(pcm_oss_file); return -EINVAL; } @@ -1809,7 +1810,7 @@ static int snd_pcm_oss_open(struct inode *inode, struct file *file) err = -EFAULT; goto __error; } - memset(setup, 0, sizeof(*setup)); + memset(setup, 0, sizeof(setup)); if (file->f_mode & FMODE_WRITE) snd_pcm_oss_look_for_setup(pcm, SNDRV_PCM_STREAM_PLAYBACK, task_name, &setup[0]); |
