aboutsummaryrefslogtreecommitdiffstats
path: root/sound/pci/emu10k1/emu10k1x.c
diff options
context:
space:
mode:
authorTobias Klauser <tklauser@nuerscht.ch>2006-03-22 04:53:19 -0500
committerJaroslav Kysela <perex@suse.cz>2006-03-22 04:53:19 -0500
commit9d2f928ddf64ca0361562e30faf584cd33055c60 (patch)
treec9f57551988fc492e20553aa39b24af7547ab239 /sound/pci/emu10k1/emu10k1x.c
parent84f3430c7255668a0298d166605d27e3c96b5de4 (diff)
[PATCH] Intruduce DMA_28BIT_MASK
This patch introduces the DMA_28BIT_MASK constant in dma-mapping.h ALSA drivers using this mask are changed to use the new constant. Signed-off-by: Tobias Klauser <tklauser@nuerscht.ch> Acked-by: Takashi Iwai <tiwai@suse.de> Acked-by: Jaroslav Kysela <perex@suse.cz>
Diffstat (limited to 'sound/pci/emu10k1/emu10k1x.c')
-rw-r--r--sound/pci/emu10k1/emu10k1x.c13
1 files changed, 7 insertions, 6 deletions
diff --git a/sound/pci/emu10k1/emu10k1x.c b/sound/pci/emu10k1/emu10k1x.c
index 1107c8ec7f78..2208dbd48be9 100644
--- a/sound/pci/emu10k1/emu10k1x.c
+++ b/sound/pci/emu10k1/emu10k1x.c
@@ -33,6 +33,7 @@
33#include <linux/init.h> 33#include <linux/init.h>
34#include <linux/interrupt.h> 34#include <linux/interrupt.h>
35#include <linux/pci.h> 35#include <linux/pci.h>
36#include <linux/dma-mapping.h>
36#include <linux/slab.h> 37#include <linux/slab.h>
37#include <linux/moduleparam.h> 38#include <linux/moduleparam.h>
38#include <sound/core.h> 39#include <sound/core.h>
@@ -893,24 +894,24 @@ static int __devinit snd_emu10k1x_create(struct snd_card *card,
893 static struct snd_device_ops ops = { 894 static struct snd_device_ops ops = {
894 .dev_free = snd_emu10k1x_dev_free, 895 .dev_free = snd_emu10k1x_dev_free,
895 }; 896 };
896 897
897 *rchip = NULL; 898 *rchip = NULL;
898 899
899 if ((err = pci_enable_device(pci)) < 0) 900 if ((err = pci_enable_device(pci)) < 0)
900 return err; 901 return err;
901 if (pci_set_dma_mask(pci, 0x0fffffff) < 0 || 902 if (pci_set_dma_mask(pci, DMA_28BIT_MASK) < 0 ||
902 pci_set_consistent_dma_mask(pci, 0x0fffffff) < 0) { 903 pci_set_consistent_dma_mask(pci, DMA_28BIT_MASK) < 0) {
903 snd_printk(KERN_ERR "error to set 28bit mask DMA\n"); 904 snd_printk(KERN_ERR "error to set 28bit mask DMA\n");
904 pci_disable_device(pci); 905 pci_disable_device(pci);
905 return -ENXIO; 906 return -ENXIO;
906 } 907 }
907 908
908 chip = kzalloc(sizeof(*chip), GFP_KERNEL); 909 chip = kzalloc(sizeof(*chip), GFP_KERNEL);
909 if (chip == NULL) { 910 if (chip == NULL) {
910 pci_disable_device(pci); 911 pci_disable_device(pci);
911 return -ENOMEM; 912 return -ENOMEM;
912 } 913 }
913 914
914 chip->card = card; 915 chip->card = card;
915 chip->pci = pci; 916 chip->pci = pci;
916 chip->irq = -1; 917 chip->irq = -1;