diff options
Diffstat (limited to 'sound/soc/nuc900')
-rw-r--r-- | sound/soc/nuc900/nuc900-ac97.c | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/sound/soc/nuc900/nuc900-ac97.c b/sound/soc/nuc900/nuc900-ac97.c index e1634a2f1701..c49a7934a7b2 100644 --- a/sound/soc/nuc900/nuc900-ac97.c +++ b/sound/soc/nuc900/nuc900-ac97.c | |||
@@ -66,9 +66,8 @@ static unsigned short nuc900_ac97_read(struct snd_ac97 *ac97, | |||
66 | udelay(100); | 66 | udelay(100); |
67 | 67 | ||
68 | /* polling the AC_R_FINISH */ | 68 | /* polling the AC_R_FINISH */ |
69 | val = AUDIO_READ(nuc900_audio->mmio + ACTL_ACCON); | 69 | while (!(AUDIO_READ(nuc900_audio->mmio + ACTL_ACCON) & AC_R_FINISH) |
70 | val &= AC_R_FINISH; | 70 | && timeout--) |
71 | while (!val && timeout--) | ||
72 | mdelay(1); | 71 | mdelay(1); |
73 | 72 | ||
74 | if (!timeout) { | 73 | if (!timeout) { |
@@ -121,9 +120,8 @@ static void nuc900_ac97_write(struct snd_ac97 *ac97, unsigned short reg, | |||
121 | udelay(100); | 120 | udelay(100); |
122 | 121 | ||
123 | /* polling the AC_W_FINISH */ | 122 | /* polling the AC_W_FINISH */ |
124 | tmp = AUDIO_READ(nuc900_audio->mmio + ACTL_ACCON); | 123 | while ((AUDIO_READ(nuc900_audio->mmio + ACTL_ACCON) & AC_W_FINISH) |
125 | tmp &= AC_W_FINISH; | 124 | && timeout--) |
126 | while (tmp && timeout--) | ||
127 | mdelay(1); | 125 | mdelay(1); |
128 | 126 | ||
129 | if (!timeout) | 127 | if (!timeout) |