* [PATCH] SPI: Fix apparently reversed args to time_before().
@ 2010-01-01 17:24 Robert P. J. Day
0 siblings, 0 replies; only message in thread
From: Robert P. J. Day @ 2010-01-01 17:24 UTC (permalink / raw)
To: Linux Kernel Mailing List; +Cc: spi-devel-general
Signed-off-by: Robert P. J. Day <rpjday@crashcourse.ca>
---
given that the macro this is contained in reads:
#define busy_wait(cond) \
({ \
unsigned long end_jiffies = jiffies + STMP_SPI_TIMEOUT; \
bool succeeded = false; \
do { \
if (cond) { \
succeeded = true; \
break; \
} \
cpu_relax(); \
} while (time_before(jiffies, end_jiffies)); \
succeeded; \
})
it seems obvious that those args are in the wrong order.
diff --git a/drivers/spi/spi_stmp.c b/drivers/spi/spi_stmp.c
index 2552bb3..fadff76 100644
--- a/drivers/spi/spi_stmp.c
+++ b/drivers/spi/spi_stmp.c
@@ -76,7 +76,7 @@ struct stmp_spi {
break; \
} \
cpu_relax(); \
- } while (time_before(end_jiffies, jiffies)); \
+ } while (time_before(jiffies, end_jiffies)); \
succeeded; \
})
========================================================================
Robert P. J. Day Waterloo, Ontario, CANADA
Linux Consulting, Training and Kernel Pedantry.
Web page: http://crashcourse.ca
Twitter: http://twitter.com/rpjday
========================================================================
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2010-01-01 17:24 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-01-01 17:24 [PATCH] SPI: Fix apparently reversed args to time_before() Robert P. J. Day
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).