mirror of
https://github.com/followmsi/android_kernel_google_msm.git
synced 2024-09-22 04:32:41 +00:00
[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>
This commit is contained in:
parent
11370ee2c1
commit
22d3a20030
1 changed files with 2 additions and 2 deletions
|
@ -43,11 +43,11 @@ static int wait_handshake(struct echoaudio *chip)
|
||||||
{
|
{
|
||||||
int i;
|
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++) {
|
for (i = 0; i < HANDSHAKE_TIMEOUT; i++) {
|
||||||
/* Look for the handshake value */
|
/* Look for the handshake value */
|
||||||
|
barrier();
|
||||||
if (chip->comm_page->handshake) {
|
if (chip->comm_page->handshake) {
|
||||||
/*if (i) DE_ACT(("Handshake time: %d\n", i));*/
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
udelay(1);
|
udelay(1);
|
||||||
|
|
Loading…
Reference in a new issue