aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/spi/dw_spi.c
diff options
context:
space:
mode:
authorFeng Tang <feng.tang@intel.com>2010-01-20 15:49:45 -0500
committerGrant Likely <grant.likely@secretlab.ca>2010-01-20 15:49:45 -0500
commitb490e3704ccee12deb295f96029d68e0daf02feb (patch)
treee13483b1a765b9e9194b06071347a830e493a959 /drivers/spi/dw_spi.c
parentfa0fcde66ac3360678360104b24492015e7b852b (diff)
spi/dw_spi: bug fix 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 <feng.tang@intel.com> Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
Diffstat (limited to 'drivers/spi/dw_spi.c')
-rw-r--r--drivers/spi/dw_spi.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/spi/dw_spi.c b/drivers/spi/dw_spi.c
index 31620fae77be..521d680af289 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)
161 161
162static void wait_till_not_busy(struct dw_spi *dws) 162static void wait_till_not_busy(struct dw_spi *dws)
163{ 163{
164 unsigned long end = jiffies + usecs_to_jiffies(1000); 164 unsigned long end = jiffies + 1 + usecs_to_jiffies(1000);
165 165
166 while (time_before(jiffies, end)) { 166 while (time_before(jiffies, end)) {
167 if (!(dw_readw(dws, sr) & SR_BUSY)) 167 if (!(dw_readw(dws, sr) & SR_BUSY))