Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit d7554caa authored by Linus Walleij's avatar Linus Walleij Committed by Chris Ball
Browse files

mmc: tmio_mmc: unmap with the proper sglen



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: default avatarLinus Walleij <linus.walleij@linaro.org>
Signed-off-by: default avatarChris Ball <cjb@laptop.org>
parent 2dc7ddc1
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -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);