diff options
Diffstat (limited to 'sound/pci')
-rw-r--r-- | sound/pci/atiixp.c | 36 |
1 files changed, 10 insertions, 26 deletions
diff --git a/sound/pci/atiixp.c b/sound/pci/atiixp.c index 92df811d695d..7d8053b5e8d5 100644 --- a/sound/pci/atiixp.c +++ b/sound/pci/atiixp.c | |||
@@ -296,21 +296,9 @@ static struct pci_device_id snd_atiixp_ids[] = { | |||
296 | 296 | ||
297 | MODULE_DEVICE_TABLE(pci, snd_atiixp_ids); | 297 | MODULE_DEVICE_TABLE(pci, snd_atiixp_ids); |
298 | 298 | ||
299 | struct atiixp_quirk { | 299 | static struct snd_pci_quirk atiixp_quirks[] __devinitdata = { |
300 | unsigned short subvendor; | 300 | SND_PCI_QUIRK(0x15bd, 0x3100, "DFI RS482", 0), |
301 | unsigned short subdevice; | 301 | { } /* terminator */ |
302 | const char *name; | ||
303 | int ac97_codec; | ||
304 | }; | ||
305 | |||
306 | static struct atiixp_quirk atiixp_quirks[] __devinitdata = { | ||
307 | { | ||
308 | .subvendor = 0x15bd, | ||
309 | .subdevice = 0x3100, | ||
310 | .name = "DFI RS482", | ||
311 | .ac97_codec = 0, | ||
312 | }, | ||
313 | { .subvendor = 0 } /* terminator */ | ||
314 | }; | 302 | }; |
315 | 303 | ||
316 | /* | 304 | /* |
@@ -574,17 +562,13 @@ static int snd_atiixp_aclink_down(struct atiixp *chip) | |||
574 | 562 | ||
575 | static int ac97_probing_bugs(struct pci_dev *pci) | 563 | static int ac97_probing_bugs(struct pci_dev *pci) |
576 | { | 564 | { |
577 | int i = 0; | 565 | const struct snd_pci_quirk *q; |
578 | 566 | ||
579 | while (atiixp_quirks[i].subvendor) { | 567 | q = snd_pci_quirk_lookup(pci, atiixp_quirks); |
580 | if (pci->subsystem_vendor == atiixp_quirks[i].subvendor && | 568 | if (q) { |
581 | pci->subsystem_device == atiixp_quirks[i].subdevice) { | 569 | snd_printdd(KERN_INFO "Atiixp quirk for %s. " |
582 | printk(KERN_INFO "Atiixp quirk for %s. " | 570 | "Forcing codec %d\n", q->name, q->value); |
583 | "Forcing codec %d\n", atiixp_quirks[i].name, | 571 | return q->value; |
584 | atiixp_quirks[i].ac97_codec); | ||
585 | return atiixp_quirks[i].ac97_codec; | ||
586 | } | ||
587 | i++; | ||
588 | } | 572 | } |
589 | /* this hardware doesn't need workarounds. Probe for codec */ | 573 | /* this hardware doesn't need workarounds. Probe for codec */ |
590 | return -1; | 574 | return -1; |