aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2011-02-13 10:59:48 -0500
committerLinus Torvalds <torvalds@linux-foundation.org>2011-02-13 10:59:48 -0500
commit091994cfb8e7d7a372c2d547778a91012d899e16 (patch)
tree71c6d214f9287bb61d24345a93b60579937a711b /drivers
parentd8ed516f82f0f4cda11282450512310ab273637e (diff)
parentc170093d31bd4e3bc51881cc0f123beeca7872c9 (diff)
Merge branch 'spi/merge' of git://git.secretlab.ca/git/linux-2.6
* 'spi/merge' of git://git.secretlab.ca/git/linux-2.6: devicetree-discuss is moderated for non-subscribers MAINTAINERS: Add entry for GPIO subsystem dt: add documentation of ARM dt boot interface dt: Remove obsolete description of powerpc boot interface dt: Move device tree documentation out of powerpc directory spi/spi_sh_msiof: fix wrong address calculation, which leads to an Oops
Diffstat (limited to 'drivers')
-rw-r--r--drivers/spi/spi_sh_msiof.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/drivers/spi/spi_sh_msiof.c b/drivers/spi/spi_sh_msiof.c
index 56f60c8ea0a..2c665fceaac 100644
--- a/drivers/spi/spi_sh_msiof.c
+++ b/drivers/spi/spi_sh_msiof.c
@@ -509,9 +509,11 @@ static int sh_msiof_spi_txrx(struct spi_device *spi, struct spi_transfer *t)
509 bytes_done = 0; 509 bytes_done = 0;
510 510
511 while (bytes_done < t->len) { 511 while (bytes_done < t->len) {
512 void *rx_buf = t->rx_buf ? t->rx_buf + bytes_done : NULL;
513 const void *tx_buf = t->tx_buf ? t->tx_buf + bytes_done : NULL;
512 n = sh_msiof_spi_txrx_once(p, tx_fifo, rx_fifo, 514 n = sh_msiof_spi_txrx_once(p, tx_fifo, rx_fifo,
513 t->tx_buf + bytes_done, 515 tx_buf,
514 t->rx_buf + bytes_done, 516 rx_buf,
515 words, bits); 517 words, bits);
516 if (n < 0) 518 if (n < 0)
517 break; 519 break;