diff options
author | Stefano Stabellini <stefano.stabellini@eu.citrix.com> | 2013-08-05 12:30:48 -0400 |
---|---|---|
committer | Konrad Rzeszutek Wilk <konrad.wilk@oracle.com> | 2013-08-09 11:29:00 -0400 |
commit | 781575cd8127c30a0444953bcd0b6d1e882df13e (patch) | |
tree | c23bbab4ab2ff532721e55f083651172c655aada /drivers/xen/swiotlb-xen.c | |
parent | 4d86ec7a8a3f9c135fdc34d7aed2a9467e2e6ff9 (diff) |
swiotlb-xen: replace dma_length with sg_dma_len() macro
swiotlb-xen has an implicit dependency on CONFIG_NEED_SG_DMA_LENGTH.
Remove it by replacing dma_length with sg_dma_len.
Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Diffstat (limited to 'drivers/xen/swiotlb-xen.c')
-rw-r--r-- | drivers/xen/swiotlb-xen.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/xen/swiotlb-xen.c b/drivers/xen/swiotlb-xen.c index aadffcf7db9b..1b2277c311d2 100644 --- a/drivers/xen/swiotlb-xen.c +++ b/drivers/xen/swiotlb-xen.c | |||
@@ -506,13 +506,13 @@ xen_swiotlb_map_sg_attrs(struct device *hwdev, struct scatterlist *sgl, | |||
506 | to do proper error handling. */ | 506 | to do proper error handling. */ |
507 | xen_swiotlb_unmap_sg_attrs(hwdev, sgl, i, dir, | 507 | xen_swiotlb_unmap_sg_attrs(hwdev, sgl, i, dir, |
508 | attrs); | 508 | attrs); |
509 | sgl[0].dma_length = 0; | 509 | sg_dma_len(sgl) = 0; |
510 | return DMA_ERROR_CODE; | 510 | return DMA_ERROR_CODE; |
511 | } | 511 | } |
512 | sg->dma_address = xen_phys_to_bus(map); | 512 | sg->dma_address = xen_phys_to_bus(map); |
513 | } else | 513 | } else |
514 | sg->dma_address = dev_addr; | 514 | sg->dma_address = dev_addr; |
515 | sg->dma_length = sg->length; | 515 | sg_dma_len(sg) = sg->length; |
516 | } | 516 | } |
517 | return nelems; | 517 | return nelems; |
518 | } | 518 | } |
@@ -533,7 +533,7 @@ xen_swiotlb_unmap_sg_attrs(struct device *hwdev, struct scatterlist *sgl, | |||
533 | BUG_ON(dir == DMA_NONE); | 533 | BUG_ON(dir == DMA_NONE); |
534 | 534 | ||
535 | for_each_sg(sgl, sg, nelems, i) | 535 | for_each_sg(sgl, sg, nelems, i) |
536 | xen_unmap_single(hwdev, sg->dma_address, sg->dma_length, dir); | 536 | xen_unmap_single(hwdev, sg->dma_address, sg_dma_len(sg), dir); |
537 | 537 | ||
538 | } | 538 | } |
539 | EXPORT_SYMBOL_GPL(xen_swiotlb_unmap_sg_attrs); | 539 | EXPORT_SYMBOL_GPL(xen_swiotlb_unmap_sg_attrs); |
@@ -555,7 +555,7 @@ xen_swiotlb_sync_sg(struct device *hwdev, struct scatterlist *sgl, | |||
555 | 555 | ||
556 | for_each_sg(sgl, sg, nelems, i) | 556 | for_each_sg(sgl, sg, nelems, i) |
557 | xen_swiotlb_sync_single(hwdev, sg->dma_address, | 557 | xen_swiotlb_sync_single(hwdev, sg->dma_address, |
558 | sg->dma_length, dir, target); | 558 | sg_dma_len(sg), dir, target); |
559 | } | 559 | } |
560 | 560 | ||
561 | void | 561 | void |