]> 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 39ec55b57b1e808ffef72e96cbea23bc9095cabd..a7f38e63303f82120ceffacb4f08daf4b75f889d 100644 (file)
@@ -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);
 }
@@ -930,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;