Skip to content

Commit

Permalink
iommu/vt-d: Constify intel_dma_ops
Browse files Browse the repository at this point in the history
Most dma_map_ops structures are never modified. Constify these
structures such that these can be write-protected.

Signed-off-by: Arvind Yadav <arvind.yadav.cs@gmail.com>
Signed-off-by: Joerg Roedel <jroedel@suse.de>
  • Loading branch information
Arvind Yadav authored and Joerg Roedel committed Jun 28, 2017
1 parent 58c4a95 commit 01e1932
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/iommu/intel-iommu.c
Original file line number Diff line number Diff line change
@@ -3954,7 +3954,7 @@ static int intel_mapping_error(struct device *dev, dma_addr_t dma_addr)
return !dma_addr;
}

struct dma_map_ops intel_dma_ops = {
const struct dma_map_ops intel_dma_ops = {
.alloc = intel_alloc_coherent,
.free = intel_free_coherent,
.map_sg = intel_map_sg,

0 comments on commit 01e1932

Please sign in to comment.