Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit b490e370 authored by Feng Tang's avatar Feng Tang Committed by Grant Likely
Browse files

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: default avatarFeng Tang <feng.tang@intel.com>
Signed-off-by: default avatarGrant Likely <grant.likely@secretlab.ca>
parent fa0fcde6
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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))