Explorar o código

pxamci: fix dma_unmap_sg length

dma_unmap_sg should be given the same length as dma_map_sg, not the
value returned from dma_map_sg

Signed-off-by: Vernon Sauder <vsauder@inhand.com>
Signed-off-by: Pierre Ossman <drzeus@drzeus.cx>
Vernon Sauder %!s(int64=17) %!d(string=hai) anos
pai
achega
c00a46abd4
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      drivers/mmc/host/pxamci.c

+ 1 - 1
drivers/mmc/host/pxamci.c

@@ -283,7 +283,7 @@ static int pxamci_data_done(struct pxamci_host *host, unsigned int stat)
 		return 0;
 
 	DCSR(host->dma) = 0;
-	dma_unmap_sg(mmc_dev(host->mmc), data->sg, host->dma_len,
+	dma_unmap_sg(mmc_dev(host->mmc), data->sg, data->sg_len,
 		     host->dma_dir);
 
 	if (stat & STAT_READ_TIME_OUT)