Signed-off-by: Robert P. J. Day <[email protected]>

---

  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
========================================================================

------------------------------------------------------------------------------
This SF.Net email is sponsored by the Verizon Developer Community
Take advantage of Verizon's best-in-class app development support
A streamlined, 14 day to market process makes app distribution fast and easy
Join now and get one step closer to millions of Verizon customers
http://p.sf.net/sfu/verizon-dev2dev 
_______________________________________________
spi-devel-general mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/spi-devel-general

Reply via email to