]> git.proxmox.com Git - mirror_ubuntu-eoan-kernel.git/commitdiff
dmaengine: at_hdmac: use dma_address to program DMA hardware
authorNicolas Ferre <nicolas.ferre@atmel.com>
Wed, 15 Dec 2010 17:50:16 +0000 (18:50 +0100)
committerDan Williams <dan.j.williams@intel.com>
Sat, 15 Jan 2011 00:25:58 +0000 (16:25 -0800)
In atc_prep_slave_sg() function we use dma_address field of scatterlist with
sg_dma_address() macro instead of sg_phys(). DMA address is already computed
by dma_map_sg() or another mapping function in calling driver.

Signed-off-by: Nicolas Ferre <nicolas.ferre@atmel.com>
Signed-off-by: Dan Williams <dan.j.williams@intel.com>
drivers/dma/at_hdmac.c

index a0f3e6a06e06532b3701ade73b110d823eec591f..6eea8883ecf319daa65d7493a20cf7fa8c430a89 100644 (file)
@@ -670,7 +670,7 @@ atc_prep_slave_sg(struct dma_chan *chan, struct scatterlist *sgl,
                        if (!desc)
                                goto err_desc_get;
 
-                       mem = sg_phys(sg);
+                       mem = sg_dma_address(sg);
                        len = sg_dma_len(sg);
                        mem_width = 2;
                        if (unlikely(mem & 3 || len & 3))
@@ -712,7 +712,7 @@ atc_prep_slave_sg(struct dma_chan *chan, struct scatterlist *sgl,
                        if (!desc)
                                goto err_desc_get;
 
-                       mem = sg_phys(sg);
+                       mem = sg_dma_address(sg);
                        len = sg_dma_len(sg);
                        mem_width = 2;
                        if (unlikely(mem & 3 || len & 3))