diff options
author | Feng Tang <feng.tang@intel.com> | 2010-01-20 15:49:45 -0500 |
---|---|---|
committer | Grant Likely <grant.likely@secretlab.ca> | 2010-01-20 15:49:45 -0500 |
commit | b490e3704ccee12deb295f96029d68e0daf02feb (patch) | |
tree | e13483b1a765b9e9194b06071347a830e493a959 /drivers/spi/dw_spi.c | |
parent | fa0fcde66ac3360678360104b24492015e7b852b (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.c | 2 |
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 | ||
162 | static void wait_till_not_busy(struct dw_spi *dws) | 162 | static 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)) |