]> git.karo-electronics.de Git - linux-beck.git/commitdiff
mmc: tmio_mmc: unmap with the proper sglen
authorLinus Walleij <linus.walleij@linaro.org>
Thu, 10 Feb 2011 15:10:47 +0000 (16:10 +0100)
committerChris Ball <cjb@laptop.org>
Tue, 15 Mar 2011 17:49:21 +0000 (13:49 -0400)
According to the DMA-API you shall unmap the sglists with the same
sglist length as passed into the mapping function, not the
returned value from the mapping function.

Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Chris Ball <cjb@laptop.org>
drivers/mmc/host/tmio_mmc.c

index 0d36fa9c629e09fb3718f0e593a4307c831b2b67..1b9fa21c2bdcb6f0c22cf115b8740bc55bbb0508 100644 (file)
@@ -983,11 +983,11 @@ static void tmio_tasklet_fn(unsigned long arg)
 
        if (host->data->flags & MMC_DATA_READ)
                dma_unmap_sg(host->chan_rx->device->dev,
-                            host->sg_ptr, host->dma_sglen,
+                            host->sg_ptr, host->sg_len,
                             DMA_FROM_DEVICE);
        else
                dma_unmap_sg(host->chan_tx->device->dev,
-                            host->sg_ptr, host->dma_sglen,
+                            host->sg_ptr, host->sg_len,
                             DMA_TO_DEVICE);
 
        tmio_mmc_do_data_irq(host);