]> err.no Git - linux-2.6/blobdiff - sound/pci/cs46xx/dsp_spos_scb_lib.c
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/ieee1394...
[linux-2.6] / sound / pci / cs46xx / dsp_spos_scb_lib.c
index 3844d18af19ca00eae8aedf9314b6054f7c8b909..2873cfe48c331605f50d23f84350ba4865ce9750 100644 (file)
  */
 
 
-#include <sound/driver.h>
 #include <asm/io.h>
 #include <linux/delay.h>
-#include <linux/pci.h>
 #include <linux/pm.h>
 #include <linux/init.h>
 #include <linux/slab.h>
@@ -180,6 +178,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;
+       unsigned long flags;
 
        /* check integrety */
        snd_assert ( (scb->index >= 0 && 
@@ -194,9 +193,9 @@ void cs46xx_dsp_remove_scb (struct snd_cs46xx *chip, struct dsp_scb_descriptor *
                     goto _end);
 #endif
 
-       spin_lock(&scb->lock);
+       spin_lock_irqsave(&scb->lock, flags);
        _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 );
@@ -232,7 +231,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_info_unregister(scb->proc_info);
+               snd_info_free_entry(scb->proc_info);
                scb->proc_info = NULL;
 
                snd_assert (scb_info != NULL, return);
@@ -1480,7 +1479,7 @@ void cs46xx_dsp_destroy_pcm_channel (struct snd_cs46xx * chip,
        if (!pcm_channel->src_scb->ref_count) {
                cs46xx_dsp_remove_scb(chip,pcm_channel->src_scb);
 
-               snd_assert (pcm_channel->src_slot >= 0 && pcm_channel->src_slot <= DSP_MAX_SRC_NR,
+               snd_assert (pcm_channel->src_slot >= 0 && pcm_channel->src_slot < DSP_MAX_SRC_NR,
                            return );
 
                ins->src_scb_slots[pcm_channel->src_slot] = 0;