Skip to content
This repository has been archived by the owner on Nov 21, 2022. It is now read-only.

Commit

Permalink
spi_bfin5xx: limit reaches -1
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
RoelKluin authored and torvalds committed Jun 18, 2009
1 parent 349888e commit b4bd2ab
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/spi/spi_bfin5xx.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit b4bd2ab

Please sign in to comment.