Commit 58e4334e authored by Harvey Harrison's avatar Harvey Harrison Committed by Takashi Iwai

[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: default avatarHarvey Harrison <harvey.harrison@gmail.com>
Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
parent 3463d8fa
...@@ -1285,7 +1285,6 @@ static int wait_for_codec(struct fm801 *chip, unsigned int codec_id, ...@@ -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) static int snd_fm801_chip_init(struct fm801 *chip, int resume)
{ {
int id;
unsigned short cmdw; unsigned short cmdw;
if (chip->tea575x_tuner & 0x0010) if (chip->tea575x_tuner & 0x0010)
...@@ -1310,13 +1309,14 @@ static int snd_fm801_chip_init(struct fm801 *chip, int resume) ...@@ -1310,13 +1309,14 @@ static int snd_fm801_chip_init(struct fm801 *chip, int resume)
} else { } else {
/* my card has the secondary codec */ /* my card has the secondary codec */
/* at address #3, so the loop is inverted */ /* at address #3, so the loop is inverted */
for (id = 3; id > 0; id--) { int i;
if (! wait_for_codec(chip, id, AC97_VENDOR_ID1, for (i = 3; i > 0; i--) {
if (!wait_for_codec(chip, i, AC97_VENDOR_ID1,
msecs_to_jiffies(50))) { msecs_to_jiffies(50))) {
cmdw = inw(FM801_REG(chip, AC97_DATA)); cmdw = inw(FM801_REG(chip, AC97_DATA));
if (cmdw != 0xffff && cmdw != 0) { if (cmdw != 0xffff && cmdw != 0) {
chip->secondary = 1; chip->secondary = 1;
chip->secondary_addr = id; chip->secondary_addr = i;
break; break;
} }
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment