[ALSA] au88x0: Remove unneeded call to pci_dma_supported()
authorTobias Klauser <tklauser@nuerscht.ch>
Thu, 1 Dec 2005 10:14:00 +0000 (11:14 +0100)
committerJaroslav Kysela <perex@suse.cz>
Tue, 3 Jan 2006 11:30:12 +0000 (12:30 +0100)
Modules: au88x0 driver

pci_dma_supported() is called right before pci_set_dma_mask() which already
calls pci_dma_supported().  The attached patch removes the unneeded call to
pci_dma_supported()

Additionally the custom VORTEX_DMA_MASK macro is replaced by DMA_32BIT_MASK
from linux/dma-mapping.h

Signed-off-by: Tobias Klauser <tklauser@nuerscht.ch>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
sound/pci/au88x0/au88x0.c
sound/pci/au88x0/au88x0.h

index 7c547859ae00d6adbb9c6c8247968ae3e2c63a29..7d9184f7367a87cc0b1ce9f05e1c1fa15db5ecc4 100644 (file)
@@ -20,6 +20,7 @@
 #include <linux/slab.h>
 #include <linux/interrupt.h>
 #include <linux/moduleparam.h>
+#include <linux/dma-mapping.h>
 #include <sound/initval.h>
 
 // module parameters (see "Module Parameters")
@@ -150,11 +151,10 @@ snd_vortex_create(struct snd_card *card, struct pci_dev *pci, vortex_t ** rchip)
        // check PCI availability (DMA).
        if ((err = pci_enable_device(pci)) < 0)
                return err;
-       if (!pci_dma_supported(pci, VORTEX_DMA_MASK)) {
+       if (pci_set_dma_mask(pci, DMA_32BIT_MASK)) {
                printk(KERN_ERR "error to set DMA mask\n");
                return -ENXIO;
        }
-       pci_set_dma_mask(pci, VORTEX_DMA_MASK);
 
        chip = kzalloc(sizeof(*chip), GFP_KERNEL);
        if (chip == NULL)
index 745f995a20ddfaa0d0d402b8fd87d00a723da9fc..c2ad2674bea71402fd5814a44bd29f970af40247 100644 (file)
@@ -39,8 +39,6 @@
 #include "au88x0_wt.h"
 #endif
 
-#define        VORTEX_DMA_MASK 0xffffffff
-
 #define        hwread(x,y) readl((x)+((y)>>2))
 #define        hwwrite(x,y,z) writel((z),(x)+((y)>>2))