diff options
-rw-r--r-- | drivers/spi/atmel_spi.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/spi/atmel_spi.c b/drivers/spi/atmel_spi.c index f5b3fdbb1e27..8ce70cbdbb96 100644 --- a/drivers/spi/atmel_spi.c +++ b/drivers/spi/atmel_spi.c | |||
@@ -189,14 +189,14 @@ static void atmel_spi_next_xfer_data(struct spi_master *master, | |||
189 | 189 | ||
190 | /* use scratch buffer only when rx or tx data is unspecified */ | 190 | /* use scratch buffer only when rx or tx data is unspecified */ |
191 | if (xfer->rx_buf) | 191 | if (xfer->rx_buf) |
192 | *rx_dma = xfer->rx_dma + xfer->len - len; | 192 | *rx_dma = xfer->rx_dma + xfer->len - *plen; |
193 | else { | 193 | else { |
194 | *rx_dma = as->buffer_dma; | 194 | *rx_dma = as->buffer_dma; |
195 | if (len > BUFFER_SIZE) | 195 | if (len > BUFFER_SIZE) |
196 | len = BUFFER_SIZE; | 196 | len = BUFFER_SIZE; |
197 | } | 197 | } |
198 | if (xfer->tx_buf) | 198 | if (xfer->tx_buf) |
199 | *tx_dma = xfer->tx_dma + xfer->len - len; | 199 | *tx_dma = xfer->tx_dma + xfer->len - *plen; |
200 | else { | 200 | else { |
201 | *tx_dma = as->buffer_dma; | 201 | *tx_dma = as->buffer_dma; |
202 | if (len > BUFFER_SIZE) | 202 | if (len > BUFFER_SIZE) |