Skip to content

Commit

Permalink
spi/dw_spi: bug fix in wait_till_not_busy()
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Feng Tang authored and Grant Likely committed Jan 20, 2010
1 parent fa0fcde commit b490e37
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/spi/dw_spi.c
Original file line number Diff line number Diff line change
Expand Up @@ -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))
Expand Down

0 comments on commit b490e37

Please sign in to comment.