aboutsummaryrefslogtreecommitdiffstats
path: root/sound/pci/au88x0/au88x0.c
diff options
context:
space:
mode:
Diffstat (limited to 'sound/pci/au88x0/au88x0.c')
-rw-r--r--sound/pci/au88x0/au88x0.c26
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
80static void __devinit snd_vortex_workaround(struct pci_dev *vortex, int fix) 80static 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