Skip to content

Commit

Permalink
[ALSA] echoaudio - Add barrier() to prevent compiler optimization
Browse files Browse the repository at this point in the history
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 <[email protected]>
Signed-off-by: Takashi Iwai <[email protected]>
Signed-off-by: Jaroslav Kysela <[email protected]>
  • Loading branch information
Giuliano Pochini authored and perexg committed Oct 16, 2007
1 parent 11370ee commit 22d3a20
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions sound/pci/echoaudio/echoaudio_dsp.c
Original file line number Diff line number Diff line change
Expand Up @@ -43,11 +43,11 @@ static int wait_handshake(struct echoaudio *chip)
{
int i;

/* Wait up to 10ms for the handshake from the DSP */
/* Wait up to 20ms for the handshake from the DSP */
for (i = 0; i < HANDSHAKE_TIMEOUT; i++) {
/* Look for the handshake value */
barrier();
if (chip->comm_page->handshake) {
/*if (i) DE_ACT(("Handshake time: %d\n", i));*/
return 0;
}
udelay(1);
Expand Down

0 comments on commit 22d3a20

Please sign in to comment.