diff options
author | Pavel Hofman <pavel.hofman@ivitera.com> | 2012-01-10 20:28:47 +0100 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2012-01-11 08:57:40 +0100 |
commit | 2b151ef734b1be749e355f32f94f649acfde0f48 (patch) | |
tree | 390781db233af45617a2d4b19992f0a812791b6b /sound | |
parent | ffd364ddd3090e2ef0d4882970c1e342db8b482f (diff) | |
download | linux-2b151ef734b1be749e355f32f94f649acfde0f48.tar.bz2 |
ALSA: ice1724 - Allow card info based on model only
When two different cards share the same PCI vendor/subvendor
identification, allow card info based on model only.
Do not require subvendor ID.
Signed-off-by: Pavel Hofman <pavel.hofman@ivitera.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound')
-rw-r--r-- | sound/pci/ice1712/ice1724.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/sound/pci/ice1712/ice1724.c b/sound/pci/ice1712/ice1724.c index e797823ddc3a..352f3fffa645 100644 --- a/sound/pci/ice1712/ice1724.c +++ b/sound/pci/ice1712/ice1724.c @@ -2282,7 +2282,7 @@ static int __devinit snd_vt1724_read_eeprom(struct snd_ice1712 *ice, } } for (tbl = card_tables; *tbl; tbl++) { - for (c = *tbl; c->subvendor; c++) { + for (c = *tbl; c->name; c++) { if (modelname && c->model && !strcmp(modelname, c->model)) { printk(KERN_INFO "ice1724: Using board model %s\n", @@ -2591,8 +2591,10 @@ static int __devinit snd_vt1724_probe(struct pci_dev *pci, ice->ext_clock_count = 0; for (tbl = card_tables; *tbl; tbl++) { - for (c = *tbl; c->subvendor; c++) { - if (c->subvendor == ice->eeprom.subvendor) { + for (c = *tbl; c->name; c++) { + if ((model[dev] && c->model && + !strcmp(model[dev], c->model)) || + (c->subvendor == ice->eeprom.subvendor)) { strcpy(card->shortname, c->name); if (c->driver) /* specific driver? */ strcpy(card->driver, c->driver); |