From: Jarkko Nikula Date: Mon, 21 Mar 2011 14:27:30 +0000 (+0200) Subject: spi/omap_mcspi: Fix broken last word xfer X-Git-Tag: v2.6.39-rc1~88^2~1 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=95c5c3ab7db0dcaeebeb771b90152cd47aa27243;p=pandora-kernel.git spi/omap_mcspi: Fix broken last word xfer Commit adef658 "spi/omap_mcspi: catch xfers of non-multiple SPI word size" broke the transmission of last word in cases where access is multiple of word size and word size is 16 or 32 bits. Fix this by replacing the test "c > (word_len>>3)" in do-while loops with "c >= 'pointer increment size'". This ensures that the last word is transmitted in above case and still allow to break the loop and prevent variable c underflow in cases where word size != 'pointer increment size'. Signed-off-by: Jarkko Nikula Tested-by: Sourav Poddar Acked-by: Michael Jones Signed-off-by: Grant Likely --- Reading git-diff-tree failed