Kalle Valo feed9bab7b spi: omap2_mcspi PIO RX fix
Before transmission of the last word in PIO RX_ONLY mode rx+tx mode
is enabled:

	/* prevent last RX_ONLY read from triggering
	 * more word i/o: switch to rx+tx
	 */
	if (c == 0 && tx == NULL)
		mcspi_write_cs_reg(spi,
				OMAP2_MCSPI_CHCONF0, l);

But because c is decremented after the test, c will never be zero and
rx+tx will not be enabled. This breaks RX_ONLY mode PIO transfers.

Fix it by decrementing c in the beginning of the various I/O loops.

Signed-off-by: Kalle Valo <kalle.valo@nokia.com>
Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2008-01-24 14:06:44 -08:00
..
2007-10-17 08:42:52 -07:00
2008-01-23 23:50:01 -05:00
2008-01-14 08:52:22 -08:00
2007-10-29 17:27:50 -04:00
2007-10-16 09:43:09 -07:00
2008-01-23 21:23:13 -05:00
2008-01-14 21:53:31 +01:00
2008-01-11 11:42:07 -08:00
2007-12-31 23:11:11 +00:00
2007-11-05 15:12:31 -08:00
2007-11-29 09:24:53 -08:00
2007-12-12 20:01:00 +01:00
2008-01-23 03:11:45 -08:00
2007-12-23 12:54:37 -08:00
2007-12-17 19:28:15 -08:00
2008-01-24 14:06:44 -08:00
2007-10-17 08:42:57 -07:00
2008-01-21 19:39:41 -08:00
2007-10-23 15:49:54 +10:00