From: Kalle Valo Date: Fri, 11 Jan 2008 17:28:51 +0000 (+0200) Subject: omap2_mcspi: fix PIO RX_ONLY transfer X-Git-Tag: v2.6.24-omap1~63 X-Git-Url: https://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=2ae71b94269fa117f637ba01f1f26d978ac2f60a;p=pandora-kernel.git omap2_mcspi: fix PIO RX_ONLY transfer 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 already in the beginning of the loop. Signed-off-by: Kalle Valo Signed-off-by: Tony Lindgren --- Reading git-diff-tree failed