Skip to content

Commit

Permalink
iommu/tegra: Convert to iommu_capable() API function
Browse files Browse the repository at this point in the history
Cc: Hiroshi Doyu <hdoyu@nvidia.com>
Signed-off-by: Joerg Roedel <jroedel@suse.de>
  • Loading branch information
Joerg Roedel committed Sep 25, 2014
1 parent 4480845 commit 7c2aa64
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 8 deletions.
7 changes: 3 additions & 4 deletions drivers/iommu/tegra-gart.c
Original file line number Diff line number Diff line change
Expand Up @@ -303,21 +303,20 @@ static phys_addr_t gart_iommu_iova_to_phys(struct iommu_domain *domain,
return pa;
}

static int gart_iommu_domain_has_cap(struct iommu_domain *domain,
unsigned long cap)
static bool gart_iommu_capable(enum iommu_cap cap)
{
return 0;
return false;
}

static const struct iommu_ops gart_iommu_ops = {
.capable = gart_iommu_capable,
.domain_init = gart_iommu_domain_init,
.domain_destroy = gart_iommu_domain_destroy,
.attach_dev = gart_iommu_attach_dev,
.detach_dev = gart_iommu_detach_dev,
.map = gart_iommu_map,
.unmap = gart_iommu_unmap,
.iova_to_phys = gart_iommu_iova_to_phys,
.domain_has_cap = gart_iommu_domain_has_cap,
.pgsize_bitmap = GART_IOMMU_PGSIZES,
};

Expand Down
7 changes: 3 additions & 4 deletions drivers/iommu/tegra-smmu.c
Original file line number Diff line number Diff line change
Expand Up @@ -780,10 +780,9 @@ static phys_addr_t smmu_iommu_iova_to_phys(struct iommu_domain *domain,
return PFN_PHYS(pfn);
}

static int smmu_iommu_domain_has_cap(struct iommu_domain *domain,
unsigned long cap)
static bool smmu_iommu_capable(enum iommu_cap cap)
{
return 0;
return false;
}

static int smmu_iommu_attach_dev(struct iommu_domain *domain,
Expand Down Expand Up @@ -949,14 +948,14 @@ static void smmu_iommu_domain_destroy(struct iommu_domain *domain)
}

static const struct iommu_ops smmu_iommu_ops = {
.capable = smmu_iommu_capable,
.domain_init = smmu_iommu_domain_init,
.domain_destroy = smmu_iommu_domain_destroy,
.attach_dev = smmu_iommu_attach_dev,
.detach_dev = smmu_iommu_detach_dev,
.map = smmu_iommu_map,
.unmap = smmu_iommu_unmap,
.iova_to_phys = smmu_iommu_iova_to_phys,
.domain_has_cap = smmu_iommu_domain_has_cap,
.pgsize_bitmap = SMMU_IOMMU_PGSIZES,
};

Expand Down

0 comments on commit 7c2aa64

Please sign in to comment.