diff options
author | Jiri Slaby <xslaby@fi.muni.cz> | 2005-09-07 16:28:33 +0400 |
---|---|---|
committer | Jaroslav Kysela <perex@suse.cz> | 2005-09-12 12:47:08 +0400 |
commit | 0dd119f703d50759f0835f342e385f82cbf8b89e (patch) | |
tree | d2b5805f5ae93b44cab1603b9e80fbf163048d8f /sound/pci/ali5451 | |
parent | 8cdfd2519c6c9a1e6057dc5970b2542b35895738 (diff) | |
download | linux-0dd119f703d50759f0835f342e385f82cbf8b89e.tar.xz |
[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/pci/ali5451')
-rw-r--r-- | sound/pci/ali5451/ali5451.c | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/sound/pci/ali5451/ali5451.c b/sound/pci/ali5451/ali5451.c index 7f835d46dc1c..703770f6a507 100644 --- a/sound/pci/ali5451/ali5451.c +++ b/sound/pci/ali5451/ali5451.c @@ -318,13 +318,12 @@ static void ali_read_regs(ali_t *codec, int channel) static void ali_read_cfg(unsigned int vendor, unsigned deviceid) { unsigned int dwVal; - struct pci_dev *pci_dev = NULL; + struct pci_dev *pci_dev; int i,j; - - pci_dev = pci_find_device(vendor, deviceid, pci_dev); - if (pci_dev == NULL) - return ; + pci_dev = pci_get_device(vendor, deviceid, NULL); + if (pci_dev == NULL) + return ; printk("\nM%x PCI CFG\n", deviceid); printk(" "); @@ -341,6 +340,7 @@ static void ali_read_cfg(unsigned int vendor, unsigned deviceid) } printk("\n"); } + pci_dev_put(pci_dev); } static void ali_read_ac97regs(ali_t *codec, int secondary) { @@ -2108,6 +2108,8 @@ static int snd_ali_free(ali_t * codec) #ifdef CONFIG_PM kfree(codec->image); #endif + pci_dev_put(codec->pci_m1533); + pci_dev_put(codec->pci_m7101); kfree(codec); return 0; } @@ -2297,7 +2299,7 @@ static int __devinit snd_ali_create(snd_card_t * card, codec->chregs.data.ainten = 0x00; /* M1533: southbridge */ - pci_dev = pci_find_device(0x10b9, 0x1533, NULL); + pci_dev = pci_get_device(0x10b9, 0x1533, NULL); codec->pci_m1533 = pci_dev; if (! codec->pci_m1533) { snd_printk(KERN_ERR "ali5451: cannot find ALi 1533 chip.\n"); @@ -2305,7 +2307,7 @@ static int __devinit snd_ali_create(snd_card_t * card, return -ENODEV; } /* M7101: power management */ - pci_dev = pci_find_device(0x10b9, 0x7101, NULL); + pci_dev = pci_get_device(0x10b9, 0x7101, NULL); codec->pci_m7101 = pci_dev; if (! codec->pci_m7101 && codec->revision == ALI_5451_V02) { snd_printk(KERN_ERR "ali5451: cannot find ALi 7101 chip.\n"); |