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

Commit b4bd2aba authored by Roel Kluin's avatar Roel Kluin Committed by Linus Torvalds
Browse files

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: default avatarRoel Kluin <roel.kluin@gmail.com>
Acked-by: default avatarDavid Brownell <dbrownell@users.sourceforge.net>
Cc: Bryan Wu <cooloney@kernel.org>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent 349888ee
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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);