From: Feng Tang Date: Wed, 20 Jan 2010 20:49:45 +0000 (-0700) Subject: spi/dw_spi: bug fix in wait_till_not_busy() X-Git-Url: https://rtime.felk.cvut.cz/gitweb/lisovros/linux_canprio.git/commitdiff_plain/b490e3704ccee12deb295f96029d68e0daf02feb 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 Signed-off-by: Grant Likely --- diff --git a/drivers/spi/dw_spi.c b/drivers/spi/dw_spi.c index 31620fae77b..521d680af28 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))