提交 22d3a200 编写于 作者: G Giuliano Pochini 提交者: Jaroslav Kysela

[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: NGiuliano Pochini <pochini@shiny.it>
Signed-off-by: NTakashi Iwai <tiwai@suse.de>
Signed-off-by: NJaroslav Kysela <perex@suse.cz>
上级 11370ee2
......@@ -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);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册