summaryrefslogtreecommitdiffstats
path: root/drivers/spi/spi_bfin5xx.c
diff options
context:
space:
mode:
authorRoel Kluin <roel.kluin@gmail.com>2009-06-18 01:26:02 +0200
committerLinus Torvalds <torvalds@linux-foundation.org>2009-06-18 22:03:41 +0200
commitb4bd2ababd20b6ecdd49cf96e39c875fbedd53af (patch)
treecd44bcaca19a16e333975f09b7a7711311fcb3be /drivers/spi/spi_bfin5xx.c
parentproc.txt: update kernel filesystem/proc.txt documentation (diff)
downloadlinux-b4bd2ababd20b6ecdd49cf96e39c875fbedd53af.tar.xz
linux-b4bd2ababd20b6ecdd49cf96e39c875fbedd53af.zip
spi_bfin5xx: limit reaches -1
bfin_spi_flush() returns limit, which reaches -1 upon timeout. but in function bfin_spi_pump_transfers() it is compared with 0. Signed-off-by: Roel Kluin <roel.kluin@gmail.com> Acked-by: David Brownell <dbrownell@users.sourceforge.net> Cc: Bryan Wu <cooloney@kernel.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'drivers/spi/spi_bfin5xx.c')
-rw-r--r--drivers/spi/spi_bfin5xx.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/spi/spi_bfin5xx.c b/drivers/spi/spi_bfin5xx.c
index 011c5bddba6a..2e5fd0977334 100644
--- a/drivers/spi/spi_bfin5xx.c
+++ b/drivers/spi/spi_bfin5xx.c
@@ -169,7 +169,7 @@ static int bfin_spi_flush(struct driver_data *drv_data)
unsigned long limit = loops_per_jiffy << 1;
/* wait for stop and clear stat */
- while (!(read_STAT(drv_data) & BIT_STAT_SPIF) && limit--)
+ while (!(read_STAT(drv_data) & BIT_STAT_SPIF) && --limit)
cpu_relax();
write_STAT(drv_data, BIT_STAT_CLR);