diff options
author | Jiri Slaby <xslaby@fi.muni.cz> | 2005-09-07 14:28:33 +0200 |
---|---|---|
committer | Jaroslav Kysela <perex@suse.cz> | 2005-09-12 10:47:08 +0200 |
commit | 0dd119f703d50759f0835f342e385f82cbf8b89e (patch) | |
tree | d2b5805f5ae93b44cab1603b9e80fbf163048d8f /sound/pci/au88x0 | |
parent | 8cdfd2519c6c9a1e6057dc5970b2542b35895738 (diff) | |
download | kernel-common-0dd119f703d50759f0835f342e385f82cbf8b89e.tar.gz kernel-common-0dd119f703d50759f0835f342e385f82cbf8b89e.tar.bz2 kernel-common-0dd119f703d50759f0835f342e385f82cbf8b89e.zip |
[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/au88x0')
-rw-r--r-- | sound/pci/au88x0/au88x0.c | 26 |
1 files changed, 16 insertions, 10 deletions
diff --git a/sound/pci/au88x0/au88x0.c b/sound/pci/au88x0/au88x0.c index f6236c63aaaa..0e33e0650cf5 100644 --- a/sound/pci/au88x0/au88x0.c +++ b/sound/pci/au88x0/au88x0.c @@ -79,19 +79,21 @@ static void vortex_fix_agp_bridge(struct pci_dev *via) static void __devinit snd_vortex_workaround(struct pci_dev *vortex, int fix) { - struct pci_dev *via; + struct pci_dev *via = NULL; /* autodetect if workarounds are required */ if (fix == 255) { /* VIA KT133 */ - via = pci_find_device(PCI_VENDOR_ID_VIA, PCI_DEVICE_ID_VIA_8365_1, NULL); + via = pci_get_device(PCI_VENDOR_ID_VIA, + PCI_DEVICE_ID_VIA_8365_1, NULL); /* VIA Apollo */ if (via == NULL) { - via = pci_find_device(PCI_VENDOR_ID_VIA, PCI_DEVICE_ID_VIA_82C598_1, NULL); - } - /* AMD Irongate */ - if (via == NULL) { - via = pci_find_device(PCI_VENDOR_ID_AMD, PCI_DEVICE_ID_AMD_FE_GATE_7007, NULL); + via = pci_get_device(PCI_VENDOR_ID_VIA, + PCI_DEVICE_ID_VIA_82C598_1, NULL); + /* AMD Irongate */ + if (via == NULL) + via = pci_get_device(PCI_VENDOR_ID_AMD, + PCI_DEVICE_ID_AMD_FE_GATE_7007, NULL); } if (via) { printk(KERN_INFO CARD_NAME ": Activating latency workaround...\n"); @@ -101,13 +103,17 @@ static void __devinit snd_vortex_workaround(struct pci_dev *vortex, int fix) } else { if (fix & 0x1) vortex_fix_latency(vortex); - if ((fix & 0x2) && (via = pci_find_device(PCI_VENDOR_ID_VIA, PCI_DEVICE_ID_VIA_8365_1, NULL))) + if ((fix & 0x2) && (via = pci_get_device(PCI_VENDOR_ID_VIA, + PCI_DEVICE_ID_VIA_8365_1, NULL))) vortex_fix_agp_bridge(via); - if ((fix & 0x4) && (via = pci_find_device(PCI_VENDOR_ID_VIA, PCI_DEVICE_ID_VIA_82C598_1, NULL))) + if ((fix & 0x4) && (via = pci_get_device(PCI_VENDOR_ID_VIA, + PCI_DEVICE_ID_VIA_82C598_1, NULL))) vortex_fix_agp_bridge(via); - if ((fix & 0x8) && (via = pci_find_device(PCI_VENDOR_ID_AMD, PCI_DEVICE_ID_AMD_FE_GATE_7007, NULL))) + if ((fix & 0x8) && (via = pci_get_device(PCI_VENDOR_ID_AMD, + PCI_DEVICE_ID_AMD_FE_GATE_7007, NULL))) vortex_fix_agp_bridge(via); } + pci_dev_put(via); } // component-destructor |