git.openpandora.org
/
pandora-kernel.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge branch 'devicetree/merge' into spi/merge
[pandora-kernel.git]
/
drivers
/
spi
/
spi_sh_msiof.c
diff --git
a/drivers/spi/spi_sh_msiof.c
b/drivers/spi/spi_sh_msiof.c
index
d93b667
..
2c665fc
100644
(file)
--- 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) {
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,
n = sh_msiof_spi_txrx_once(p, tx_fifo, rx_fifo,
- t
->tx_buf + bytes_done
,
-
t->rx_buf + bytes_done
,
+ t
x_buf
,
+
rx_buf
,
words, bits);
if (n < 0)
break;
words, bits);
if (n < 0)
break;
@@
-635,7
+637,7
@@
static int sh_msiof_spi_remove(struct platform_device *pdev)
ret = spi_bitbang_stop(&p->bitbang);
if (!ret) {
pm_runtime_disable(&pdev->dev);
ret = spi_bitbang_stop(&p->bitbang);
if (!ret) {
pm_runtime_disable(&pdev->dev);
- free_irq(platform_get_irq(pdev, 0),
sh_msiof_spi_irq
);
+ free_irq(platform_get_irq(pdev, 0),
p
);
iounmap(p->mapbase);
clk_put(p->clk);
spi_master_put(p->bitbang.master);
iounmap(p->mapbase);
clk_put(p->clk);
spi_master_put(p->bitbang.master);