summaryrefslogtreecommitdiffstats
path: root/drivers/spi/spi.c
diff options
context:
space:
mode:
authorMark Brown <broonie@kernel.org>2017-02-19 17:40:55 +0100
committerMark Brown <broonie@kernel.org>2017-02-19 17:40:55 +0100
commit3490462378944c7e137657d0d66bb707303cfc96 (patch)
treeed0a745abd1c44b02629c8aaa8943ef88f7300f9 /drivers/spi/spi.c
parentMerge remote-tracking branch 'spi/topic/core' into spi-next (diff)
parentspi: mediatek: Only do dma for 4-byte aligned buffers (diff)
downloadlinux-3490462378944c7e137657d0d66bb707303cfc96.tar.xz
linux-3490462378944c7e137657d0d66bb707303cfc96.zip
Merge remote-tracking branch 'spi/topic/dma' into spi-next
Diffstat (limited to 'drivers/spi/spi.c')
-rw-r--r--drivers/spi/spi.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/spi/spi.c b/drivers/spi/spi.c
index 59cb26470d70..e70955339d33 100644
--- a/drivers/spi/spi.c
+++ b/drivers/spi/spi.c
@@ -807,12 +807,12 @@ static int __spi_map_msg(struct spi_master *master, struct spi_message *msg)
if (master->dma_tx)
tx_dev = master->dma_tx->device->dev;
else
- tx_dev = &master->dev;
+ tx_dev = master->dev.parent;
if (master->dma_rx)
rx_dev = master->dma_rx->device->dev;
else
- rx_dev = &master->dev;
+ rx_dev = master->dev.parent;
list_for_each_entry(xfer, &msg->transfers, transfer_list) {
if (!master->can_dma(master, msg->spi, xfer))
@@ -854,12 +854,12 @@ static int __spi_unmap_msg(struct spi_master *master, struct spi_message *msg)
if (master->dma_tx)
tx_dev = master->dma_tx->device->dev;
else
- tx_dev = &master->dev;
+ tx_dev = master->dev.parent;
if (master->dma_rx)
rx_dev = master->dma_rx->device->dev;
else
- rx_dev = &master->dev;
+ rx_dev = master->dev.parent;
list_for_each_entry(xfer, &msg->transfers, transfer_list) {
if (!master->can_dma(master, msg->spi, xfer))