diff options
author | Harvey Harrison <harvey.harrison@gmail.com> | 2008-02-28 13:52:17 +0300 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2008-04-24 14:00:16 +0400 |
commit | 7dfa31ed5e1fc0ace7f1959b9564ad43d78fd7af (patch) | |
tree | 4176e43cf2287509ad0066db547f7120b530023a /sound/pci | |
parent | 964a788e0ba64aa4ce2e6488718f3ee28cc2e61e (diff) | |
download | linux-7dfa31ed5e1fc0ace7f1959b9564ad43d78fd7af.tar.xz |
[ALSA] sound: cmipci.c fix shadowed variable warning
A temporary variable for each mixer element is used in an initialization
loop, use the name elem_id.
sound/pci/cmipci.c:2747:26: warning: symbol 'id' shadows an earlier one
sound/pci/cmipci.c:56:13: originally declared here
[tiwai - fixed a coding style issue as well]
Signed-off-by: Harvey Harrison <harvey.harrison@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/pci')
-rw-r--r-- | sound/pci/cmipci.c | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/sound/pci/cmipci.c b/sound/pci/cmipci.c index 135f30860753..4074584a7d90 100644 --- a/sound/pci/cmipci.c +++ b/sound/pci/cmipci.c @@ -2744,12 +2744,13 @@ static int __devinit snd_cmipci_mixer_new(struct cmipci *cm, int pcm_spdif_devic } for (idx = 0; idx < CM_SAVED_MIXERS; idx++) { - struct snd_ctl_elem_id id; + struct snd_ctl_elem_id elem_id; struct snd_kcontrol *ctl; - memset(&id, 0, sizeof(id)); - id.iface = SNDRV_CTL_ELEM_IFACE_MIXER; - strcpy(id.name, cm_saved_mixer[idx].name); - if ((ctl = snd_ctl_find_id(cm->card, &id)) != NULL) + memset(&elem_id, 0, sizeof(elem_id)); + elem_id.iface = SNDRV_CTL_ELEM_IFACE_MIXER; + strcpy(elem_id.name, cm_saved_mixer[idx].name); + ctl = snd_ctl_find_id(cm->card, &elem_id); + if (ctl) cm->mixer_res_ctl[idx] = ctl; } |