From: Bryan Wu Date: Wed, 5 Dec 2007 07:45:19 +0000 (-0800) Subject: spi: spi_bfin: bugfix for 8..16 bit word sizes X-Git-Tag: v2.6.24-rc5~84 X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=c3061abb9e95920407288cba143dc1af0babf099;p=linux-2.6 spi: spi_bfin: bugfix for 8..16 bit word sizes Fix bug in u16_cs_chg_reader to read data_len-2 bytes data firstly, then read out the last 2 bytes data Signed-off-by: Bryan Wu Signed-off-by: David Brownell Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- diff --git a/drivers/spi/spi_bfin5xx.c b/drivers/spi/spi_bfin5xx.c index c4c4905e0a..25b0efc591 100644 --- a/drivers/spi/spi_bfin5xx.c +++ b/drivers/spi/spi_bfin5xx.c @@ -501,7 +501,7 @@ static void u16_cs_chg_reader(struct driver_data *drv_data) cs_active(drv_data, chip); dummy_read(drv_data); - while (drv_data->rx < drv_data->rx_end) { + while (drv_data->rx < drv_data->rx_end - 2) { cs_deactive(drv_data, chip); if (chip->cs_chg_udelay)