diff options
Diffstat (limited to 'sound/pci/emu10k1/io.c')
-rw-r--r-- | sound/pci/emu10k1/io.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/sound/pci/emu10k1/io.c b/sound/pci/emu10k1/io.c index 08a0cb545822..ef5304df8c11 100644 --- a/sound/pci/emu10k1/io.c +++ b/sound/pci/emu10k1/io.c | |||
@@ -148,15 +148,16 @@ int snd_emu10k1_spi_write(struct snd_emu10k1 * emu, | |||
148 | snd_emu10k1_ptr20_write(emu, reg, 0, set | data); | 148 | snd_emu10k1_ptr20_write(emu, reg, 0, set | data); |
149 | result = 1; | 149 | result = 1; |
150 | /* Wait for status bit to return to 0 */ | 150 | /* Wait for status bit to return to 0 */ |
151 | for (n=0;n<100;n++) { | 151 | for (n = 0; n < 100; n++) { |
152 | udelay(10); | 152 | udelay(10); |
153 | tmp = snd_emu10k1_ptr20_read(emu, reg, 0); | 153 | tmp = snd_emu10k1_ptr20_read(emu, reg, 0); |
154 | if (!(tmp & 0x10000)) { | 154 | if (!(tmp & 0x10000)) { |
155 | result=0; | 155 | result = 0; |
156 | break; | 156 | break; |
157 | } | 157 | } |
158 | } | 158 | } |
159 | if (result) return 1; /* Timed out */ | 159 | if (result) /* Timed out */ |
160 | return 1; | ||
160 | snd_emu10k1_ptr20_write(emu, reg, 0, reset | data); | 161 | snd_emu10k1_ptr20_write(emu, reg, 0, reset | data); |
161 | tmp = snd_emu10k1_ptr20_read(emu, reg, 0); /* Write post */ | 162 | tmp = snd_emu10k1_ptr20_read(emu, reg, 0); /* Write post */ |
162 | return 0; | 163 | return 0; |