diff options
Diffstat (limited to 'sound')
-rw-r--r-- | sound/pci/hda/patch_conexant.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/sound/pci/hda/patch_conexant.c b/sound/pci/hda/patch_conexant.c index 7e1ca43bd660..fbe97d32140d 100644 --- a/sound/pci/hda/patch_conexant.c +++ b/sound/pci/hda/patch_conexant.c | |||
@@ -407,10 +407,16 @@ static int conexant_add_jack(struct hda_codec *codec, | |||
407 | struct conexant_spec *spec; | 407 | struct conexant_spec *spec; |
408 | struct conexant_jack *jack; | 408 | struct conexant_jack *jack; |
409 | const char *name; | 409 | const char *name; |
410 | int err; | 410 | int i, err; |
411 | 411 | ||
412 | spec = codec->spec; | 412 | spec = codec->spec; |
413 | snd_array_init(&spec->jacks, sizeof(*jack), 32); | 413 | snd_array_init(&spec->jacks, sizeof(*jack), 32); |
414 | |||
415 | jack = spec->jacks.list; | ||
416 | for (i = 0; i < spec->jacks.used; i++, jack++) | ||
417 | if (jack->nid == nid) | ||
418 | return 0 ; /* already present */ | ||
419 | |||
414 | jack = snd_array_new(&spec->jacks); | 420 | jack = snd_array_new(&spec->jacks); |
415 | name = (type == SND_JACK_HEADPHONE) ? "Headphone" : "Mic" ; | 421 | name = (type == SND_JACK_HEADPHONE) ? "Headphone" : "Mic" ; |
416 | 422 | ||