>From 124fda393891d31debc2a3b760627edb18422203 Mon Sep 17 00:00:00 2001
From: Feng Tang <[email protected]>
Date: Fri, 25 Dec 2009 11:18:32 +0800
Subject: [PATCH 1/3] spi: dw_spi: fix a bug in wait_till_not_busy()

Make the driver wait at least  for 1 jiffie before issuing the
warning, no matter what HZ is set to

Signed-off-by: Feng Tang <[email protected]>
---
 drivers/spi/dw_spi.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/spi/dw_spi.c b/drivers/spi/dw_spi.c
index 31620fa..521d680 100644
--- a/drivers/spi/dw_spi.c
+++ b/drivers/spi/dw_spi.c
@@ -161,7 +161,7 @@ static inline void mrst_spi_debugfs_remove(struct dw_spi 
*dws)
 
 static void wait_till_not_busy(struct dw_spi *dws)
 {
-       unsigned long end = jiffies + usecs_to_jiffies(1000);
+       unsigned long end = jiffies + 1 + usecs_to_jiffies(1000);
 
        while (time_before(jiffies, end)) {
                if (!(dw_readw(dws, sr) & SR_BUSY))
-- 
1.6.0.4

------------------------------------------------------------------------------
Throughout its 18-year history, RSA Conference consistently attracts the
world's best and brightest in the field, creating opportunities for Conference
attendees to learn about information security's most important issues through
interactions with peers, luminaries and emerging and established companies.
http://p.sf.net/sfu/rsaconf-dev2dev
_______________________________________________
spi-devel-general mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/spi-devel-general

Reply via email to