aboutsummaryrefslogtreecommitdiff
path: root/sound
diff options
context:
space:
mode:
authorBen Dooks <ben-linux@fluff.org>2008-11-03 08:53:52 +0000
committerBen Dooks <ben-linux@fluff.org>2008-11-03 08:53:52 +0000
commitf430ce6ec4c8071d358e56d531ad77bdb5cf1820 (patch)
tree94e2d6b4d84148b7b118dfedebbbd6728dfa5547 /sound
parent2c68bcc9ffc5de11493f99e0ea891003f9c0a835 (diff)
parent45beca08dd8b6d6a65c5ffd730af2eac7a2c7a03 (diff)
Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6 into s3c64xx
Diffstat (limited to 'sound')
-rw-r--r--sound/core/control.c1
-rw-r--r--sound/core/init.c5
-rw-r--r--sound/core/pcm_native.c1
-rw-r--r--sound/core/timer.c1
-rw-r--r--sound/oss/dmasound/dmasound.h2
-rw-r--r--sound/oss/dmasound/dmasound_core.c4
-rw-r--r--sound/sparc/dbri.c2
7 files changed, 9 insertions, 7 deletions
diff --git a/sound/core/control.c b/sound/core/control.c
index b0bf4269104..636b3b52ef8 100644
--- a/sound/core/control.c
+++ b/sound/core/control.c
@@ -113,7 +113,6 @@ static int snd_ctl_release(struct inode *inode, struct file *file)
unsigned int idx;
ctl = file->private_data;
- fasync_helper(-1, file, 0, &ctl->fasync);
file->private_data = NULL;
card = ctl->card;
write_lock_irqsave(&card->ctl_files_rwlock, flags);
diff --git a/sound/core/init.c b/sound/core/init.c
index ef2352c2e45..b47ff8b44be 100644
--- a/sound/core/init.c
+++ b/sound/core/init.c
@@ -264,8 +264,11 @@ static int snd_disconnect_release(struct inode *inode, struct file *file)
}
spin_unlock(&shutdown_lock);
- if (likely(df))
+ if (likely(df)) {
+ if ((file->f_flags & FASYNC) && df->disconnected_f_op->fasync)
+ df->disconnected_f_op->fasync(-1, file, 0);
return df->disconnected_f_op->release(inode, file);
+ }
panic("%s(%p, %p) failed!", __func__, inode, file);
}
diff --git a/sound/core/pcm_native.c b/sound/core/pcm_native.c
index aef18682c03..a789efc9df3 100644
--- a/sound/core/pcm_native.c
+++ b/sound/core/pcm_native.c
@@ -2169,7 +2169,6 @@ static int snd_pcm_release(struct inode *inode, struct file *file)
if (snd_BUG_ON(!substream))
return -ENXIO;
pcm = substream->pcm;
- fasync_helper(-1, file, 0, &substream->runtime->fasync);
mutex_lock(&pcm->open_mutex);
snd_pcm_release_substream(substream);
kfree(pcm_file);
diff --git a/sound/core/timer.c b/sound/core/timer.c
index e582face89d..c584408c9f1 100644
--- a/sound/core/timer.c
+++ b/sound/core/timer.c
@@ -1263,7 +1263,6 @@ static int snd_timer_user_release(struct inode *inode, struct file *file)
if (file->private_data) {
tu = file->private_data;
file->private_data = NULL;
- fasync_helper(-1, file, 0, &tu->fasync);
if (tu->timeri)
snd_timer_close(tu->timeri);
kfree(tu->queue);
diff --git a/sound/oss/dmasound/dmasound.h b/sound/oss/dmasound/dmasound.h
index 1cb13fe56ec..1308d8d3418 100644
--- a/sound/oss/dmasound/dmasound.h
+++ b/sound/oss/dmasound/dmasound.h
@@ -235,7 +235,7 @@ struct sound_queue {
*/
int active;
wait_queue_head_t action_queue, open_queue, sync_queue;
- fmode_t open_mode;
+ int non_blocking;
int busy, syncing, xruns, died;
};
diff --git a/sound/oss/dmasound/dmasound_core.c b/sound/oss/dmasound/dmasound_core.c
index b8239f3168f..793b7f47843 100644
--- a/sound/oss/dmasound/dmasound_core.c
+++ b/sound/oss/dmasound/dmasound_core.c
@@ -603,7 +603,7 @@ static ssize_t sq_write(struct file *file, const char __user *src, size_t uLeft,
while (uLeft) {
while (write_sq.count >= write_sq.max_active) {
sq_play();
- if (write_sq.open_mode & O_NONBLOCK)
+ if (write_sq.non_blocking)
return uWritten > 0 ? uWritten : -EAGAIN;
SLEEP(write_sq.action_queue);
if (signal_pending(current))
@@ -718,7 +718,7 @@ static int sq_open2(struct sound_queue *sq, struct file *file, fmode_t mode,
return rc;
}
- sq->open_mode = file->f_mode;
+ sq->non_blocking = file->f_flags & O_NONBLOCK;
}
return rc;
}
diff --git a/sound/sparc/dbri.c b/sound/sparc/dbri.c
index c257ad8bdfb..23ed6f04a71 100644
--- a/sound/sparc/dbri.c
+++ b/sound/sparc/dbri.c
@@ -2534,6 +2534,8 @@ static int __devinit snd_dbri_create(struct snd_card *card,
dbri->dma = dma_alloc_coherent(&op->dev,
sizeof(struct dbri_dma),
&dbri->dma_dvma, GFP_ATOMIC);
+ if (!dbri->dma)
+ return -ENOMEM;
memset((void *)dbri->dma, 0, sizeof(struct dbri_dma));
dprintk(D_GEN, "DMA Cmd Block 0x%p (0x%08x)\n",