Skip to content

Commit

Permalink
ARM: dma-mapping: Set arm_dma_set_mask() for iommu->set_dma_mask()
Browse files Browse the repository at this point in the history
struct dma_map_ops iommu_ops doesn't have ->set_dma_mask, which causes
crash when dma_set_mask() is called from some driver.

Signed-off-by: Hiroshi Doyu <hdoyu@nvidia.com>
Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
  • Loading branch information
Hiroshi Doyu authored and Marek Szyprowski committed Feb 25, 2013
1 parent 3e3a182 commit d09e133
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions arch/arm/mm/dma-mapping.c
Original file line number Diff line number Diff line change
Expand Up @@ -1732,6 +1732,8 @@ struct dma_map_ops iommu_ops = {
.unmap_sg = arm_iommu_unmap_sg,
.sync_sg_for_cpu = arm_iommu_sync_sg_for_cpu,
.sync_sg_for_device = arm_iommu_sync_sg_for_device,

.set_dma_mask = arm_dma_set_mask,
};

struct dma_map_ops iommu_coherent_ops = {
Expand All @@ -1745,6 +1747,8 @@ struct dma_map_ops iommu_coherent_ops = {

.map_sg = arm_coherent_iommu_map_sg,
.unmap_sg = arm_coherent_iommu_unmap_sg,

.set_dma_mask = arm_dma_set_mask,
};

/**
Expand Down

0 comments on commit d09e133

Please sign in to comment.