From: Harvey Harrison Date: Fri, 29 Feb 2008 10:56:48 +0000 (+0100) Subject: [ALSA] sound: patch_sigmatel.c fix shadowed variable warning X-Git-Tag: v2.6.26-rc1~1087^2~164 X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=8b55178515e8872670dc830203dad0e9e51e16be;p=linux-2.6 [ALSA] sound: patch_sigmatel.c fix shadowed variable warning Temp variable in the loop shadows the second argument (which is otherwise unused in this function). Change this to defcfg as it is used to hold the default config. sound/pci/hda/patch_sigmatel.c:2759:18: warning: symbol 'cfg' shadows an earlier one sound/pci/hda/patch_sigmatel.c:2734:26: originally declared here Signed-off-by: Harvey Harrison Signed-off-by: Takashi Iwai --- diff --git a/sound/pci/hda/patch_sigmatel.c b/sound/pci/hda/patch_sigmatel.c index 4bc7d8646f..3bf528d8fc 100644 --- a/sound/pci/hda/patch_sigmatel.c +++ b/sound/pci/hda/patch_sigmatel.c @@ -2849,11 +2849,11 @@ static int stac9200_auto_create_lfe_ctls(struct hda_codec *codec, if (lfe_pin == 0 && spec->autocfg.speaker_outs == 0) { for (i = 0; i < spec->autocfg.line_outs && lfe_pin == 0x0; i++) { hda_nid_t pin = spec->autocfg.line_out_pins[i]; - unsigned long cfg; - cfg = snd_hda_codec_read(codec, pin, 0, + unsigned long defcfg; + defcfg = snd_hda_codec_read(codec, pin, 0, AC_VERB_GET_CONFIG_DEFAULT, 0x00); - if (get_defcfg_device(cfg) == AC_JACK_SPEAKER) { + if (get_defcfg_device(defcfg) == AC_JACK_SPEAKER) { unsigned long wcaps = get_wcaps(codec, pin); wcaps &= (AC_WCAP_STEREO | AC_WCAP_OUT_AMP); if (wcaps == AC_WCAP_OUT_AMP)