diff options
author | Takashi Iwai <tiwai@suse.de> | 2006-01-13 17:16:29 +0100 |
---|---|---|
committer | Jaroslav Kysela <perex@suse.cz> | 2006-03-22 10:23:32 +0100 |
commit | 97c67b65cbdfd19887450ae1b80ddbb54de9559d (patch) | |
tree | ad92dc802a5146c8b86e2333118f0fc394dddcfb /sound/pci/au88x0/au88x0.c | |
parent | 7a6c8ff1ef83df4ce44b586999e54966d8e5bda8 (diff) |
[ALSA] au88x0 - 64bit arch fixes
Modules: au88x0 driver
Fix the driver codes to run on 64bit architectures.
The patch taken from ALSA BTS bug#1047.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/pci/au88x0/au88x0.c')
-rw-r--r-- | sound/pci/au88x0/au88x0.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/sound/pci/au88x0/au88x0.c b/sound/pci/au88x0/au88x0.c index 7d9184f7367..126870ec063 100644 --- a/sound/pci/au88x0/au88x0.c +++ b/sound/pci/au88x0/au88x0.c @@ -151,14 +151,18 @@ 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_set_dma_mask(pci, DMA_32BIT_MASK)) { + if (pci_set_dma_mask(pci, DMA_32BIT_MASK) < 0 || + pci_set_consistent_dma_mask(pci, DMA_32BIT_MASK) < 0) { printk(KERN_ERR "error to set DMA mask\n"); + pci_disable_device(pci); return -ENXIO; } chip = kzalloc(sizeof(*chip), GFP_KERNEL); - if (chip == NULL) + if (chip == NULL) { + pci_disable_device(pci); return -ENOMEM; + } chip->card = card; @@ -208,6 +212,8 @@ snd_vortex_create(struct snd_card *card, struct pci_dev *pci, vortex_t ** rchip) goto alloc_out; } + snd_card_set_dev(card, &pci->dev); + *rchip = chip; return 0; |