aboutsummaryrefslogtreecommitdiffstats
path: root/sound/core
diff options
context:
space:
mode:
authorJiri Slaby <xslaby@fi.muni.cz>2005-09-07 08:28:33 -0400
committerJaroslav Kysela <perex@suse.cz>2005-09-12 04:47:08 -0400
commit0dd119f703d50759f0835f342e385f82cbf8b89e (patch)
treed2b5805f5ae93b44cab1603b9e80fbf163048d8f /sound/core
parent8cdfd2519c6c9a1e6057dc5970b2542b35895738 (diff)
[ALSA] pci_find_device remove
Memalloc module,CS46xx driver,VIA82xx driver,ALI5451 driver au88x0 driver Replace pci_find_device() with pci_get_device() and pci_dev_put(). Signed-off-by: Jiri Slaby <xslaby@fi.muni.cz> Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/core')
-rw-r--r--sound/core/memalloc.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/sound/core/memalloc.c b/sound/core/memalloc.c
index 39a54a415528..91124ddbdda9 100644
--- a/sound/core/memalloc.c
+++ b/sound/core/memalloc.c
@@ -590,7 +590,7 @@ static int snd_mem_proc_write(struct file *file, const char __user *buffer,
590 590
591 alloced = 0; 591 alloced = 0;
592 pci = NULL; 592 pci = NULL;
593 while ((pci = pci_find_device(vendor, device, pci)) != NULL) { 593 while ((pci = pci_get_device(vendor, device, pci)) != NULL) {
594 if (mask > 0 && mask < 0xffffffff) { 594 if (mask > 0 && mask < 0xffffffff) {
595 if (pci_set_dma_mask(pci, mask) < 0 || 595 if (pci_set_dma_mask(pci, mask) < 0 ||
596 pci_set_consistent_dma_mask(pci, mask) < 0) { 596 pci_set_consistent_dma_mask(pci, mask) < 0) {
@@ -604,6 +604,7 @@ static int snd_mem_proc_write(struct file *file, const char __user *buffer,
604 if (snd_dma_alloc_pages(SNDRV_DMA_TYPE_DEV, snd_dma_pci_data(pci), 604 if (snd_dma_alloc_pages(SNDRV_DMA_TYPE_DEV, snd_dma_pci_data(pci),
605 size, &dmab) < 0) { 605 size, &dmab) < 0) {
606 printk(KERN_ERR "snd-page-alloc: cannot allocate buffer pages (size = %d)\n", size); 606 printk(KERN_ERR "snd-page-alloc: cannot allocate buffer pages (size = %d)\n", size);
607 pci_dev_put(pci);
607 return (int)count; 608 return (int)count;
608 } 609 }
609 snd_dma_reserve_buf(&dmab, snd_dma_pci_buf_id(pci)); 610 snd_dma_reserve_buf(&dmab, snd_dma_pci_buf_id(pci));