aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--sound/pci/fm801.c8
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
1286static int snd_fm801_chip_init(struct fm801 *chip, int resume) 1286static 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 }