summaryrefslogtreecommitdiff
path: root/drivers/spi/spi_sh_msiof.c
diff options
context:
space:
mode:
authorGreg Kroah-Hartman <gregkh@suse.de>2011-02-18 20:11:27 (GMT)
committerGreg Kroah-Hartman <gregkh@suse.de>2011-02-18 20:11:27 (GMT)
commit80ae3fa5d6712ef3625eff617f72e190645d6361 (patch)
treefd9be0ecbb4baa6385aa1a75af7ced5f7d691be4 /drivers/spi/spi_sh_msiof.c
parent59db5b2b9e0327e545ff5764dadcb26062c2ab1f (diff)
parent85e2efbb1db9a18d218006706d6e4fbeb0216213 (diff)
downloadlinux-80ae3fa5d6712ef3625eff617f72e190645d6361.tar.xz
Merge 2.6.38-rc5 into staging-next
This is to resolve a merge conflict with: drivers/staging/zram/zram_drv.c as pointed out by Stephen Rothwell Cc: Stephen Rothwell <sfr@canb.auug.org.au> Cc: Nitin Gupta <ngupta@vflare.org> Cc: Robert Jennings <rcj@linux.vnet.ibm.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/spi/spi_sh_msiof.c')
-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 56f60c8..2c665fcea 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)
bytes_done = 0;
while (bytes_done < t->len) {
+ void *rx_buf = t->rx_buf ? t->rx_buf + bytes_done : NULL;
+ const void *tx_buf = t->tx_buf ? t->tx_buf + bytes_done : NULL;
n = sh_msiof_spi_txrx_once(p, tx_fifo, rx_fifo,
- t->tx_buf + bytes_done,
- t->rx_buf + bytes_done,
+ tx_buf,
+ rx_buf,
words, bits);
if (n < 0)
break;