]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
ARM: dma-mapping: Set arm_dma_set_mask() for iommu->set_dma_mask()
authorHiroshi Doyu <hdoyu@nvidia.com>
Tue, 29 Jan 2013 12:57:07 +0000 (14:57 +0200)
committerMarek Szyprowski <m.szyprowski@samsung.com>
Wed, 6 Feb 2013 07:48:17 +0000 (08:48 +0100)
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>
arch/arm/mm/dma-mapping.c

index 076c26d43864f8a5b3da49ac7231a62e8edde0c2..2e8c98673d170ca93522dacb6d9aed91c8db95cc 100644 (file)
@@ -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 = {
@@ -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,
 };
 
 /**