diff options
author | Takashi Iwai <tiwai@suse.de> | 2006-01-13 11:16:29 -0500 |
---|---|---|
committer | Jaroslav Kysela <perex@suse.cz> | 2006-03-22 04:23:32 -0500 |
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 7d9184f7367a..126870ec063a 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) | |||
151 | // check PCI availability (DMA). | 151 | // check PCI availability (DMA). |
152 | if ((err = pci_enable_device(pci)) < 0) | 152 | if ((err = pci_enable_device(pci)) < 0) |
153 | return err; | 153 | return err; |
154 | if (pci_set_dma_mask(pci, DMA_32BIT_MASK)) { | 154 | if (pci_set_dma_mask(pci, DMA_32BIT_MASK) < 0 || |
155 | pci_set_consistent_dma_mask(pci, DMA_32BIT_MASK) < 0) { | ||
155 | printk(KERN_ERR "error to set DMA mask\n"); | 156 | printk(KERN_ERR "error to set DMA mask\n"); |
157 | pci_disable_device(pci); | ||
156 | return -ENXIO; | 158 | return -ENXIO; |
157 | } | 159 | } |
158 | 160 | ||
159 | chip = kzalloc(sizeof(*chip), GFP_KERNEL); | 161 | chip = kzalloc(sizeof(*chip), GFP_KERNEL); |
160 | if (chip == NULL) | 162 | if (chip == NULL) { |
163 | pci_disable_device(pci); | ||
161 | return -ENOMEM; | 164 | return -ENOMEM; |
165 | } | ||
162 | 166 | ||
163 | chip->card = card; | 167 | chip->card = card; |
164 | 168 | ||
@@ -208,6 +212,8 @@ snd_vortex_create(struct snd_card *card, struct pci_dev *pci, vortex_t ** rchip) | |||
208 | goto alloc_out; | 212 | goto alloc_out; |
209 | } | 213 | } |
210 | 214 | ||
215 | snd_card_set_dev(card, &pci->dev); | ||
216 | |||
211 | *rchip = chip; | 217 | *rchip = chip; |
212 | 218 | ||
213 | return 0; | 219 | return 0; |