mirror of
https://github.com/torvalds/linux.git
synced 2024-11-01 17:51:43 +00:00
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>
This commit is contained in:
parent
89e4b66a2e
commit
3fc25421f5
@ -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))
|
||||
|
Loading…
Reference in New Issue
Block a user