At Thu, 5 Jan 2012 22:01:57 +0100, pavel.hofman@ivitera.com wrote:
From: Pavel Hofman pavel.hofman@ivitera.com
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
diff --git a/pci/ice1712/ice1724.c b/pci/ice1712/ice1724.c index a671377..8c473b1 100644 --- a/pci/ice1712/ice1724.c +++ b/pci/ice1712/ice1724.c @@ -2279,7 +2279,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->model; c++) {
This should be also
for (c = *tbl; c->name; c++) {
like below. It's a loop for all entries after all.
if (modelname && c->model && !strcmp(modelname, c->model)) { printk(KERN_INFO "ice1724: Using board model %s\n",
@@ -2588,8 +2588,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)) {
If possible, try to indent like indent or Emacs do, i.e. aligning with parentheses level. It'll make a bit easier to read in this case.
thanks,
Takashi
strcpy(card->shortname, c->name); if (c->driver) /* specific driver? */ strcpy(card->driver, c->driver);
-- 1.7.0.4