浏览代码

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>
Feng Tang 15 年之前
父节点
当前提交
b490e3704c
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      drivers/spi/dw_spi.c

+ 1 - 1
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))