aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/mmc/host/tmio_mmc.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/mmc/host/tmio_mmc.c')
-rw-r--r--drivers/mmc/host/tmio_mmc.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/drivers/mmc/host/tmio_mmc.c b/drivers/mmc/host/tmio_mmc.c
index a33f71841dec..0d36fa9c629e 100644
--- a/drivers/mmc/host/tmio_mmc.c
+++ b/drivers/mmc/host/tmio_mmc.c
@@ -829,7 +829,7 @@ static void tmio_mmc_start_dma_rx(struct tmio_mmc_host *host)
829 sg = host->sg_ptr; 829 sg = host->sg_ptr;
830 } 830 }
831 831
832 ret = dma_map_sg(&host->pdev->dev, sg, host->sg_len, DMA_FROM_DEVICE); 832 ret = dma_map_sg(chan->device->dev, sg, host->sg_len, DMA_FROM_DEVICE);
833 if (ret > 0) { 833 if (ret > 0) {
834 host->dma_sglen = ret; 834 host->dma_sglen = ret;
835 desc = chan->device->device_prep_slave_sg(chan, sg, ret, 835 desc = chan->device->device_prep_slave_sg(chan, sg, ret,
@@ -910,7 +910,7 @@ static void tmio_mmc_start_dma_tx(struct tmio_mmc_host *host)
910 sg = host->sg_ptr; 910 sg = host->sg_ptr;
911 } 911 }
912 912
913 ret = dma_map_sg(&host->pdev->dev, sg, host->sg_len, DMA_TO_DEVICE); 913 ret = dma_map_sg(chan->device->dev, sg, host->sg_len, DMA_TO_DEVICE);
914 if (ret > 0) { 914 if (ret > 0) {
915 host->dma_sglen = ret; 915 host->dma_sglen = ret;
916 desc = chan->device->device_prep_slave_sg(chan, sg, ret, 916 desc = chan->device->device_prep_slave_sg(chan, sg, ret,
@@ -982,10 +982,12 @@ static void tmio_tasklet_fn(unsigned long arg)
982 goto out; 982 goto out;
983 983
984 if (host->data->flags & MMC_DATA_READ) 984 if (host->data->flags & MMC_DATA_READ)
985 dma_unmap_sg(&host->pdev->dev, host->sg_ptr, host->dma_sglen, 985 dma_unmap_sg(host->chan_rx->device->dev,
986 host->sg_ptr, host->dma_sglen,
986 DMA_FROM_DEVICE); 987 DMA_FROM_DEVICE);
987 else 988 else
988 dma_unmap_sg(&host->pdev->dev, host->sg_ptr, host->dma_sglen, 989 dma_unmap_sg(host->chan_tx->device->dev,
990 host->sg_ptr, host->dma_sglen,
989 DMA_TO_DEVICE); 991 DMA_TO_DEVICE);
990 992
991 tmio_mmc_do_data_irq(host); 993 tmio_mmc_do_data_irq(host);