diff mbox

[v5,1/1] davinci: spi: replace existing driver

Message ID 4CB0665A.3000309@criticallink.com (mailing list archive)
State Superseded
Headers show

Commit Message

Michael Williamson Oct. 9, 2010, 12:55 p.m. UTC
None
diff mbox

Patch

diff --git a/drivers/spi/davinci_spi.c b/drivers/spi/davinci_spi.c
index 662ebbe..8206df1 100755
--- a/drivers/spi/davinci_spi.c
+++ b/drivers/spi/davinci_spi.c
@@ -632,13 +632,11 @@  static int davinci_spi_bufs(struct spi_device *spi, struct spi_transfer *t)
 		 * source address never increments.
 		 */
 
-		if (t->rx_buf) {
+		rx_buf_count = davinci_spi->rcount;
+		if (t->rx_buf)
 			rx_buf = t->rx_buf;
-			rx_buf_count = davinci_spi->rcount;
-		} else {
+		else
 			rx_buf = davinci_spi->rx_tmp_buf;
-			rx_buf_count = sizeof(davinci_spi->rx_tmp_buf);
-		}
 
 		t->rx_dma = dma_map_single(&spi->dev, rx_buf, rx_buf_count,
 							DMA_FROM_DEVICE);