[PATCH 12/14] Blackfin SPI driver: Fix bug in u16_cs_chg_reader to read data_len-2 bytes data firstly, then read out the last 2 bytes data

From: Bryan Wu
Date: Tue Oct 30 2007 - 05:21:52 EST


Signed-off-by: Bryan Wu <bryan.wu@xxxxxxxxxx>
---
drivers/spi/spi_bfin5xx.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/spi/spi_bfin5xx.c b/drivers/spi/spi_bfin5xx.c
index 5924903..41282bf 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)
--
1.5.3.4
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/