aboutsummaryrefslogtreecommitdiffstats
path: root/sound/pci/echoaudio
diff options
context:
space:
mode:
authorGiuliano Pochini <pochini@shiny.it>2007-09-17 06:49:40 -0400
committerJaroslav Kysela <perex@perex.cz>2007-10-16 10:50:38 -0400
commit22d3a20030439420bf2795c60529ba0e89b4d82c (patch)
treeeed3a36c5510b6d5bb15aae536bf841da0ee2c49 /sound/pci/echoaudio
parent11370ee2c1c578a704f47d5513d57274c335db43 (diff)
[ALSA] echoaudio - Add barrier() to prevent compiler optimization
This patch adds a barrier() to prevent the compiler from moving the read outside of the loop. It also fixes a comment. Signed-off-by: Giuliano Pochini <pochini@shiny.it> Signed-off-by: Takashi Iwai <tiwai@suse.de> Signed-off-by: Jaroslav Kysela <perex@suse.cz>
Diffstat (limited to 'sound/pci/echoaudio')
-rw-r--r--sound/pci/echoaudio/echoaudio_dsp.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/sound/pci/echoaudio/echoaudio_dsp.c b/sound/pci/echoaudio/echoaudio_dsp.c
index 42afa837d9b4..e6c100770392 100644
--- a/sound/pci/echoaudio/echoaudio_dsp.c
+++ b/sound/pci/echoaudio/echoaudio_dsp.c
@@ -43,11 +43,11 @@ static int wait_handshake(struct echoaudio *chip)
43{ 43{
44 int i; 44 int i;
45 45
46 /* Wait up to 10ms for the handshake from the DSP */ 46 /* Wait up to 20ms for the handshake from the DSP */
47 for (i = 0; i < HANDSHAKE_TIMEOUT; i++) { 47 for (i = 0; i < HANDSHAKE_TIMEOUT; i++) {
48 /* Look for the handshake value */ 48 /* Look for the handshake value */
49 barrier();
49 if (chip->comm_page->handshake) { 50 if (chip->comm_page->handshake) {
50 /*if (i) DE_ACT(("Handshake time: %d\n", i));*/
51 return 0; 51 return 0;
52 } 52 }
53 udelay(1); 53 udelay(1);