diff options
author | Harvey Harrison <harvey.harrison@gmail.com> | 2008-02-28 05:55:07 -0500 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2008-04-24 06:00:16 -0400 |
commit | 58e4334e82c0f4eb0147a905a127bd14f0ea0a2d (patch) | |
tree | 156f86e3cf7438c89be548737f9cacb01ee0ae91 /sound | |
parent | 3463d8fa14ba2e00ede9894efdaa65189eb04b36 (diff) |
[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')
-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, | |||
1285 | 1285 | ||
1286 | static int snd_fm801_chip_init(struct fm801 *chip, int resume) | 1286 | static int snd_fm801_chip_init(struct fm801 *chip, int resume) |
1287 | { | 1287 | { |
1288 | int id; | ||
1289 | unsigned short cmdw; | 1288 | unsigned short cmdw; |
1290 | 1289 | ||
1291 | if (chip->tea575x_tuner & 0x0010) | 1290 | if (chip->tea575x_tuner & 0x0010) |
@@ -1310,13 +1309,14 @@ static int snd_fm801_chip_init(struct fm801 *chip, int resume) | |||
1310 | } else { | 1309 | } else { |
1311 | /* my card has the secondary codec */ | 1310 | /* my card has the secondary codec */ |
1312 | /* at address #3, so the loop is inverted */ | 1311 | /* at address #3, so the loop is inverted */ |
1313 | for (id = 3; id > 0; id--) { | 1312 | int i; |
1314 | if (! wait_for_codec(chip, id, AC97_VENDOR_ID1, | 1313 | for (i = 3; i > 0; i--) { |
1314 | if (!wait_for_codec(chip, i, AC97_VENDOR_ID1, | ||
1315 | msecs_to_jiffies(50))) { | 1315 | msecs_to_jiffies(50))) { |
1316 | cmdw = inw(FM801_REG(chip, AC97_DATA)); | 1316 | cmdw = inw(FM801_REG(chip, AC97_DATA)); |
1317 | if (cmdw != 0xffff && cmdw != 0) { | 1317 | if (cmdw != 0xffff && cmdw != 0) { |
1318 | chip->secondary = 1; | 1318 | chip->secondary = 1; |
1319 | chip->secondary_addr = id; | 1319 | chip->secondary_addr = i; |
1320 | break; | 1320 | break; |
1321 | } | 1321 | } |
1322 | } | 1322 | } |