git://git.onelab.eu
/
linux-2.6.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge to kernel-2.6.20-1.2949.fc6.vs2.2.0.1
[linux-2.6.git]
/
sound
/
pci
/
cs46xx
/
dsp_spos_scb_lib.c
diff --git
a/sound/pci/cs46xx/dsp_spos_scb_lib.c
b/sound/pci/cs46xx/dsp_spos_scb_lib.c
index
d4e0fb3
..
343f51d
100644
(file)
--- a/
sound/pci/cs46xx/dsp_spos_scb_lib.c
+++ b/
sound/pci/cs46xx/dsp_spos_scb_lib.c
@@
-28,6
+28,8
@@
#include <linux/pm.h>
#include <linux/init.h>
#include <linux/slab.h>
#include <linux/pm.h>
#include <linux/init.h>
#include <linux/slab.h>
+#include <linux/mutex.h>
+
#include <sound/core.h>
#include <sound/control.h>
#include <sound/info.h>
#include <sound/core.h>
#include <sound/control.h>
#include <sound/info.h>
@@
-77,7
+79,7
@@
static void cs46xx_dsp_proc_scb_info_read (struct snd_info_entry *entry,
ins = chip->dsp_spos_instance;
ins = chip->dsp_spos_instance;
-
down
(&chip->spos_mutex);
+
mutex_lock
(&chip->spos_mutex);
snd_iprintf(buffer,"%04x %s:\n",scb->address,scb->scb_name);
for (col = 0,j = 0;j < 0x10; j++,col++) {
snd_iprintf(buffer,"%04x %s:\n",scb->address,scb->scb_name);
for (col = 0,j = 0;j < 0x10; j++,col++) {
@@
-105,7
+107,7
@@
static void cs46xx_dsp_proc_scb_info_read (struct snd_info_entry *entry,
scb->task_entry->address);
snd_iprintf(buffer,"index [%d] ref_count [%d]\n",scb->index,scb->ref_count);
scb->task_entry->address);
snd_iprintf(buffer,"index [%d] ref_count [%d]\n",scb->index,scb->ref_count);
-
up
(&chip->spos_mutex);
+
mutex_unlock
(&chip->spos_mutex);
}
#endif
}
#endif
@@
-178,6
+180,7
@@
static void _dsp_clear_sample_buffer (struct snd_cs46xx *chip, u32 sample_buffer
void cs46xx_dsp_remove_scb (struct snd_cs46xx *chip, struct dsp_scb_descriptor * scb)
{
struct dsp_spos_instance * ins = chip->dsp_spos_instance;
void cs46xx_dsp_remove_scb (struct snd_cs46xx *chip, struct dsp_scb_descriptor * scb)
{
struct dsp_spos_instance * ins = chip->dsp_spos_instance;
+ unsigned long flags;
/* check integrety */
snd_assert ( (scb->index >= 0 &&
/* check integrety */
snd_assert ( (scb->index >= 0 &&
@@
-192,9
+195,9
@@
void cs46xx_dsp_remove_scb (struct snd_cs46xx *chip, struct dsp_scb_descriptor *
goto _end);
#endif
goto _end);
#endif
- spin_lock
(&scb->lock
);
+ spin_lock
_irqsave(&scb->lock, flags
);
_dsp_unlink_scb (chip,scb);
_dsp_unlink_scb (chip,scb);
- spin_unlock
(&scb->lock
);
+ spin_unlock
_irqrestore(&scb->lock, flags
);
cs46xx_dsp_proc_free_scb_desc(scb);
snd_assert (scb->scb_symbol != NULL, return );
cs46xx_dsp_proc_free_scb_desc(scb);
snd_assert (scb->scb_symbol != NULL, return );
@@
-230,7
+233,7
@@
void cs46xx_dsp_proc_free_scb_desc (struct dsp_scb_descriptor * scb)
snd_printdd("cs46xx_dsp_proc_free_scb_desc: freeing %s\n",scb->scb_name);
snd_printdd("cs46xx_dsp_proc_free_scb_desc: freeing %s\n",scb->scb_name);
- snd_info_
unregister
(scb->proc_info);
+ snd_info_
free_entry
(scb->proc_info);
scb->proc_info = NULL;
snd_assert (scb_info != NULL, return);
scb->proc_info = NULL;
snd_assert (scb_info != NULL, return);
@@
-265,7
+268,6
@@
void cs46xx_dsp_proc_register_scb_desc (struct snd_cs46xx *chip,
entry->private_data = scb_info;
entry->mode = S_IFREG | S_IRUGO | S_IWUSR;
entry->private_data = scb_info;
entry->mode = S_IFREG | S_IRUGO | S_IWUSR;
- entry->c.text.read_size = 512;
entry->c.text.read = cs46xx_dsp_proc_scb_info_read;
if (snd_info_register(entry) < 0) {
entry->c.text.read = cs46xx_dsp_proc_scb_info_read;
if (snd_info_register(entry) < 0) {