diff options
author | Geert Uytterhoeven <geert+renesas@glider.be> | 2014-07-10 17:29:33 +0400 |
---|---|---|
committer | Mark Brown <broonie@linaro.org> | 2014-07-11 16:57:10 +0400 |
commit | 3fc25421f55e36426f5e5cc227cacc840493a943 (patch) | |
tree | 5895bda819506e0b22e5a54fcad24ae9c8c8b4e4 /drivers/spi/spi.c | |
parent | 89e4b66a2e34744615c79349aa936df1b4204faf (diff) | |
download | linux-3fc25421f55e36426f5e5cc227cacc840493a943.tar.xz |
spi: core: Pass correct device to dma_map_sg()
According to Documentation/dmaengine.txt, scatterlists must be mapped
using the DMA struct device.
However, "dma_chan.dev->device" is the sysfs class device's device.
Use "dma_chan.device->dev" instead, which is the real DMA device's device.
Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
Signed-off-by: Mark Brown <broonie@linaro.org>
Diffstat (limited to 'drivers/spi/spi.c')
-rw-r--r-- | drivers/spi/spi.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/spi/spi.c b/drivers/spi/spi.c index 91bb512e1009..e691e281e3a2 100644 --- a/drivers/spi/spi.c +++ b/drivers/spi/spi.c @@ -649,8 +649,8 @@ static int __spi_map_msg(struct spi_master *master, struct spi_message *msg) if (!master->can_dma) return 0; - tx_dev = &master->dma_tx->dev->device; - rx_dev = &master->dma_rx->dev->device; + tx_dev = master->dma_tx->device->dev; + rx_dev = master->dma_rx->device->dev; list_for_each_entry(xfer, &msg->transfers, transfer_list) { if (!master->can_dma(master, msg->spi, xfer)) @@ -689,8 +689,8 @@ static int spi_unmap_msg(struct spi_master *master, struct spi_message *msg) if (!master->cur_msg_mapped || !master->can_dma) return 0; - tx_dev = &master->dma_tx->dev->device; - rx_dev = &master->dma_rx->dev->device; + tx_dev = master->dma_tx->device->dev; + rx_dev = master->dma_rx->device->dev; list_for_each_entry(xfer, &msg->transfers, transfer_list) { if (!master->can_dma(master, msg->spi, xfer)) |