From: Takashi Iwai Date: Fri, 10 Jun 2005 17:54:23 +0000 (+0200) Subject: [ALSA] hda-codec - Allow sub_device=0 in board config check X-Git-Tag: v2.6.13-rc4~130^2~171 X-Git-Url: https://openfabrics.org/gitweb/?a=commitdiff_plain;h=5ecd7022f52872db32eddf85a527064ed7b522a3;p=~shefty%2Frdma-dev.git [ALSA] hda-codec - Allow sub_device=0 in board config check HDA Codec driver Allow sub_device=0 in board config check. This means that every device with the given sub vendor ID will match. Signed-off-by: Takashi Iwai --- diff --git a/sound/pci/hda/hda_codec.c b/sound/pci/hda/hda_codec.c index 8805928167f..f62d1d5eb7f 100644 --- a/sound/pci/hda/hda_codec.c +++ b/sound/pci/hda/hda_codec.c @@ -1540,7 +1540,8 @@ int snd_hda_check_board_config(struct hda_codec *codec, struct hda_board_config pci_read_config_word(codec->bus->pci, PCI_SUBSYSTEM_ID, &subsystem_device); for (c = tbl; c->modelname || c->pci_subvendor; c++) { if (c->pci_subvendor == subsystem_vendor && - c->pci_subdevice == subsystem_device) + (! c->pci_subdevice /* all match */|| + (c->pci_subdevice == subsystem_device))) return c->config; } }