From 0dd119f703d50759f0835f342e385f82cbf8b89e Mon Sep 17 00:00:00 2001 From: Jiri Slaby Date: Wed, 7 Sep 2005 14:28:33 +0200 Subject: [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 Signed-off-by: Takashi Iwai --- sound/core/memalloc.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'sound/core') 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, alloced = 0; pci = NULL; - while ((pci = pci_find_device(vendor, device, pci)) != NULL) { + while ((pci = pci_get_device(vendor, device, pci)) != NULL) { if (mask > 0 && mask < 0xffffffff) { if (pci_set_dma_mask(pci, mask) < 0 || 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, if (snd_dma_alloc_pages(SNDRV_DMA_TYPE_DEV, snd_dma_pci_data(pci), size, &dmab) < 0) { printk(KERN_ERR "snd-page-alloc: cannot allocate buffer pages (size = %d)\n", size); + pci_dev_put(pci); return (int)count; } snd_dma_reserve_buf(&dmab, snd_dma_pci_buf_id(pci)); -- cgit v1.2.1