diff options
author | Jiri Slaby <xslaby@fi.muni.cz> | 2005-09-07 08:28:33 -0400 |
---|---|---|
committer | Jaroslav Kysela <perex@suse.cz> | 2005-09-12 04:47:08 -0400 |
commit | 0dd119f703d50759f0835f342e385f82cbf8b89e (patch) | |
tree | d2b5805f5ae93b44cab1603b9e80fbf163048d8f /sound/pci/au88x0/au88x0.c | |
parent | 8cdfd2519c6c9a1e6057dc5970b2542b35895738 (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/pci/au88x0/au88x0.c')
-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) | |||
79 | 79 | ||
80 | static void __devinit snd_vortex_workaround(struct pci_dev *vortex, int fix) | 80 | static void __devinit snd_vortex_workaround(struct pci_dev *vortex, int fix) |
81 | { | 81 | { |
82 | struct pci_dev *via; | 82 | struct pci_dev *via = NULL; |
83 | 83 | ||
84 | /* autodetect if workarounds are required */ | 84 | /* autodetect if workarounds are required */ |
85 | if (fix == 255) { | 85 | if (fix == 255) { |
86 | /* VIA KT133 */ | 86 | /* VIA KT133 */ |
87 | via = pci_find_device(PCI_VENDOR_ID_VIA, PCI_DEVICE_ID_VIA_8365_1, NULL); | 87 | via = pci_get_device(PCI_VENDOR_ID_VIA, |
88 | PCI_DEVICE_ID_VIA_8365_1, NULL); | ||
88 | /* VIA Apollo */ | 89 | /* VIA Apollo */ |
89 | if (via == NULL) { | 90 | if (via == NULL) { |
90 | via = pci_find_device(PCI_VENDOR_ID_VIA, PCI_DEVICE_ID_VIA_82C598_1, NULL); | 91 | via = pci_get_device(PCI_VENDOR_ID_VIA, |
91 | } | 92 | PCI_DEVICE_ID_VIA_82C598_1, NULL); |
92 | /* AMD Irongate */ | 93 | /* AMD Irongate */ |
93 | if (via == NULL) { | 94 | if (via == NULL) |
94 | via = pci_find_device(PCI_VENDOR_ID_AMD, PCI_DEVICE_ID_AMD_FE_GATE_7007, NULL); | 95 | via = pci_get_device(PCI_VENDOR_ID_AMD, |
96 | PCI_DEVICE_ID_AMD_FE_GATE_7007, NULL); | ||
95 | } | 97 | } |
96 | if (via) { | 98 | if (via) { |
97 | printk(KERN_INFO CARD_NAME ": Activating latency workaround...\n"); | 99 | 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) | |||
101 | } else { | 103 | } else { |
102 | if (fix & 0x1) | 104 | if (fix & 0x1) |
103 | vortex_fix_latency(vortex); | 105 | vortex_fix_latency(vortex); |
104 | if ((fix & 0x2) && (via = pci_find_device(PCI_VENDOR_ID_VIA, PCI_DEVICE_ID_VIA_8365_1, NULL))) | 106 | if ((fix & 0x2) && (via = pci_get_device(PCI_VENDOR_ID_VIA, |
107 | PCI_DEVICE_ID_VIA_8365_1, NULL))) | ||
105 | vortex_fix_agp_bridge(via); | 108 | vortex_fix_agp_bridge(via); |
106 | if ((fix & 0x4) && (via = pci_find_device(PCI_VENDOR_ID_VIA, PCI_DEVICE_ID_VIA_82C598_1, NULL))) | 109 | if ((fix & 0x4) && (via = pci_get_device(PCI_VENDOR_ID_VIA, |
110 | PCI_DEVICE_ID_VIA_82C598_1, NULL))) | ||
107 | vortex_fix_agp_bridge(via); | 111 | vortex_fix_agp_bridge(via); |
108 | if ((fix & 0x8) && (via = pci_find_device(PCI_VENDOR_ID_AMD, PCI_DEVICE_ID_AMD_FE_GATE_7007, NULL))) | 112 | if ((fix & 0x8) && (via = pci_get_device(PCI_VENDOR_ID_AMD, |
113 | PCI_DEVICE_ID_AMD_FE_GATE_7007, NULL))) | ||
109 | vortex_fix_agp_bridge(via); | 114 | vortex_fix_agp_bridge(via); |
110 | } | 115 | } |
116 | pci_dev_put(via); | ||
111 | } | 117 | } |
112 | 118 | ||
113 | // component-destructor | 119 | // component-destructor |