diff mbox

spi/pl022: use cpu_relax in the busy loop

Message ID 1305828085-25135-1-git-send-email-linus.walleij@stericsson.com
State Accepted
Commit 521999bd4a8c47a86136b9d8223a9480f5906db8
Headers show

Commit Message

Linus Walleij May 19, 2011, 6:01 p.m. UTC
This relaxes the cpu in the polling busy-wait loop.

Reported-by: Vitaly Wool <vitalywool@gmail.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
---
 drivers/spi/amba-pl022.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)
diff mbox

Patch

diff --git a/drivers/spi/amba-pl022.c b/drivers/spi/amba-pl022.c
index 18667de..8a2b88a 100644
--- a/drivers/spi/amba-pl022.c
+++ b/drivers/spi/amba-pl022.c
@@ -1424,6 +1424,7 @@  static void do_polling_transfer(struct pl022 *pl022)
 				message->state = STATE_ERROR;
 				goto out;
 			}
+			cpu_relax();
 		}
 
 		/* Update total byte transferred */