]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - sound/pci/ad1889.c
ALSA: Kill snd_assert() in sound/pci/*
[linux-2.6-omap-h63xx.git] / sound / pci / ad1889.c
index a66d5150bb7ac3ddf437588cf99ff726b5adbca2..92f3a976ef2e719a8d81154d8501dc492deec1dd 100644 (file)
@@ -264,10 +264,10 @@ snd_ad1889_ac97_ready(struct snd_ad1889 *chip)
                mdelay(1);
        if (!retry) {
                snd_printk(KERN_ERR PFX "[%s] Link is not ready.\n",
-                      __FUNCTION__);
+                      __func__);
                return -EIO;
        }
-       ad1889_debug("[%s] ready after %d ms\n", __FUNCTION__, 400 - retry);
+       ad1889_debug("[%s] ready after %d ms\n", __func__, 400 - retry);
 
        return 0;
 }
@@ -549,7 +549,8 @@ snd_ad1889_playback_pointer(struct snd_pcm_substream *ss)
        ptr = ad1889_readl(chip, AD_DMA_WAVCA);
        ptr -= chip->wave.addr;
        
-       snd_assert((ptr >= 0) && (ptr < chip->wave.size), return 0);
+       if (snd_BUG_ON(ptr >= chip->wave.size))
+               return 0;
        
        return bytes_to_frames(ss->runtime, ptr);
 }
@@ -567,7 +568,8 @@ snd_ad1889_capture_pointer(struct snd_pcm_substream *ss)
        ptr = ad1889_readl(chip, AD_DMA_ADCCA);
        ptr -= chip->ramc.addr;
 
-       snd_assert((ptr >= 0) && (ptr < chip->ramc.size), return 0);
+       if (snd_BUG_ON(ptr >= chip->ramc.size))
+               return 0;
        
        return bytes_to_frames(ss->runtime, ptr);
 }
@@ -854,8 +856,6 @@ snd_ad1889_free(struct snd_ad1889 *chip)
 
        spin_unlock_irq(&chip->lock);
 
-       synchronize_irq(chip->irq);
-       
        if (chip->irq >= 0)
                free_irq(chip->irq, chip);