diff options
author | Harvey Harrison <harvey.harrison@gmail.com> | 2008-02-28 11:55:07 +0100 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2008-04-24 12:00:16 +0200 |
commit | 58e4334e82c0f4eb0147a905a127bd14f0ea0a2d (patch) | |
tree | 156f86e3cf7438c89be548737f9cacb01ee0ae91 /sound/pci/fm801.c | |
parent | [ALSA] sound: es1968.c fox shadowed variable warning (diff) | |
download | linux-58e4334e82c0f4eb0147a905a127bd14f0ea0a2d.tar.xz linux-58e4334e82c0f4eb0147a905a127bd14f0ea0a2d.zip |
[ALSA] sound: fm801.c fix shadowed variable warning
id was only used as a counter in a for loop, move the declaration
to where it is used and change it to i.
sound/pci/fm801.c:1288:6: warning: symbol 'id' shadows an earlier one
sound/pci/fm801.c:51: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/fm801.c')
-rw-r--r-- | sound/pci/fm801.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/sound/pci/fm801.c b/sound/pci/fm801.c index 4c300e6149fc..c129f9e2072c 100644 --- a/sound/pci/fm801.c +++ b/sound/pci/fm801.c @@ -1285,7 +1285,6 @@ static int wait_for_codec(struct fm801 *chip, unsigned int codec_id, static int snd_fm801_chip_init(struct fm801 *chip, int resume) { - int id; unsigned short cmdw; if (chip->tea575x_tuner & 0x0010) @@ -1310,13 +1309,14 @@ static int snd_fm801_chip_init(struct fm801 *chip, int resume) } else { /* my card has the secondary codec */ /* at address #3, so the loop is inverted */ - for (id = 3; id > 0; id--) { - if (! wait_for_codec(chip, id, AC97_VENDOR_ID1, + int i; + for (i = 3; i > 0; i--) { + if (!wait_for_codec(chip, i, AC97_VENDOR_ID1, msecs_to_jiffies(50))) { cmdw = inw(FM801_REG(chip, AC97_DATA)); if (cmdw != 0xffff && cmdw != 0) { chip->secondary = 1; - chip->secondary_addr = id; + chip->secondary_addr = i; break; } } |