aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/spi/spi_mpc83xx.c2
-rw-r--r--drivers/spi/spi_s3c24xx.c2
-rw-r--r--include/linux/spi/spi.h2
3 files changed, 4 insertions, 2 deletions
diff --git a/drivers/spi/spi_mpc83xx.c b/drivers/spi/spi_mpc83xx.c
index ff0b04895db0..e9798bf7b8c6 100644
--- a/drivers/spi/spi_mpc83xx.c
+++ b/drivers/spi/spi_mpc83xx.c
@@ -112,6 +112,8 @@ u32 mpc83xx_spi_tx_buf_##type(struct mpc83xx_spi *mpc83xx_spi) \
112{ \ 112{ \
113 u32 data; \ 113 u32 data; \
114 const type * tx = mpc83xx_spi->tx; \ 114 const type * tx = mpc83xx_spi->tx; \
115 if (!tx) \
116 return 0; \
115 data = *tx++; \ 117 data = *tx++; \
116 mpc83xx_spi->tx = tx; \ 118 mpc83xx_spi->tx = tx; \
117 return data; \ 119 return data; \
diff --git a/drivers/spi/spi_s3c24xx.c b/drivers/spi/spi_s3c24xx.c
index 2ebe1fc4c398..8ca08713528e 100644
--- a/drivers/spi/spi_s3c24xx.c
+++ b/drivers/spi/spi_s3c24xx.c
@@ -174,7 +174,7 @@ static int s3c24xx_spi_setup(struct spi_device *spi)
174 174
175static inline unsigned int hw_txbyte(struct s3c24xx_spi *hw, int count) 175static inline unsigned int hw_txbyte(struct s3c24xx_spi *hw, int count)
176{ 176{
177 return hw->tx ? hw->tx[count] : 0xff; 177 return hw->tx ? hw->tx[count] : 0;
178} 178}
179 179
180static int s3c24xx_spi_txrx(struct spi_device *spi, struct spi_transfer *t) 180static int s3c24xx_spi_txrx(struct spi_device *spi, struct spi_transfer *t)
diff --git a/include/linux/spi/spi.h b/include/linux/spi/spi.h
index c8bb68099eb9..176f6e36dbfa 100644
--- a/include/linux/spi/spi.h
+++ b/include/linux/spi/spi.h
@@ -289,7 +289,7 @@ extern struct spi_master *spi_busnum_to_master(u16 busnum);
289 * the data being transferred; that may reduce overhead, when the 289 * the data being transferred; that may reduce overhead, when the
290 * underlying driver uses dma. 290 * underlying driver uses dma.
291 * 291 *
292 * If the transmit buffer is null, undefined data will be shifted out 292 * If the transmit buffer is null, zeroes will be shifted out
293 * while filling rx_buf. If the receive buffer is null, the data 293 * while filling rx_buf. If the receive buffer is null, the data
294 * shifted in will be discarded. Only "len" bytes shift out (or in). 294 * shifted in will be discarded. Only "len" bytes shift out (or in).
295 * It's an error to try to shift out a partial word. (For example, by 295 * It's an error to try to shift out a partial word. (For example, by