]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - sound/pci/ad1889.c
pci: use pci_ioremap_bar() in sound/
[linux-2.6-omap-h63xx.git] / sound / pci / ad1889.c
index a66d5150bb7ac3ddf437588cf99ff726b5adbca2..a7f38e63303f82120ceffacb4f08daf4b75f889d 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);
 
@@ -932,7 +932,7 @@ snd_ad1889_create(struct snd_card *card,
                goto free_and_ret;
 
        chip->bar = pci_resource_start(pci, 0);
-       chip->iobase = ioremap_nocache(chip->bar, pci_resource_len(pci, 0));
+       chip->iobase = pci_ioremap_bar(pci, 0);
        if (chip->iobase == NULL) {
                printk(KERN_ERR PFX "unable to reserve region.\n");
                err = -EBUSY;