diff options
Diffstat (limited to 'arch/powerpc/kernel/dma_64.c')
-rw-r--r-- | arch/powerpc/kernel/dma_64.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/arch/powerpc/kernel/dma_64.c b/arch/powerpc/kernel/dma_64.c index 7b0e754383cf..9001104b56b0 100644 --- a/arch/powerpc/kernel/dma_64.c +++ b/arch/powerpc/kernel/dma_64.c | |||
@@ -154,12 +154,13 @@ static void dma_direct_unmap_single(struct device *dev, dma_addr_t dma_addr, | |||
154 | { | 154 | { |
155 | } | 155 | } |
156 | 156 | ||
157 | static int dma_direct_map_sg(struct device *dev, struct scatterlist *sg, | 157 | static int dma_direct_map_sg(struct device *dev, struct scatterlist *sgl, |
158 | int nents, enum dma_data_direction direction) | 158 | int nents, enum dma_data_direction direction) |
159 | { | 159 | { |
160 | struct scatterlist *sg; | ||
160 | int i; | 161 | int i; |
161 | 162 | ||
162 | for (i = 0; i < nents; i++, sg++) { | 163 | for_each_sg(sgl, sg, nents, i) { |
163 | sg->dma_address = (page_to_phys(sg->page) + sg->offset) | | 164 | sg->dma_address = (page_to_phys(sg->page) + sg->offset) | |
164 | dma_direct_offset; | 165 | dma_direct_offset; |
165 | sg->dma_length = sg->length; | 166 | sg->dma_length = sg->length; |