Skip to content

Commit 7c2aa64

Browse files
committed
iommu/tegra: Convert to iommu_capable() API function
Cc: Hiroshi Doyu <hdoyu@nvidia.com> Signed-off-by: Joerg Roedel <jroedel@suse.de>
1 parent 4480845 commit 7c2aa64

2 files changed

Lines changed: 6 additions & 8 deletions

File tree

‎drivers/iommu/tegra-gart.c‎

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -303,21 +303,20 @@ static phys_addr_t gart_iommu_iova_to_phys(struct iommu_domain *domain,
303303
return pa;
304304
}
305305

306-
static int gart_iommu_domain_has_cap(struct iommu_domain *domain,
307-
unsigned long cap)
306+
static bool gart_iommu_capable(enum iommu_cap cap)
308307
{
309-
return 0;
308+
return false;
310309
}
311310

312311
static const struct iommu_ops gart_iommu_ops = {
312+
.capable = gart_iommu_capable,
313313
.domain_init = gart_iommu_domain_init,
314314
.domain_destroy = gart_iommu_domain_destroy,
315315
.attach_dev = gart_iommu_attach_dev,
316316
.detach_dev = gart_iommu_detach_dev,
317317
.map = gart_iommu_map,
318318
.unmap = gart_iommu_unmap,
319319
.iova_to_phys = gart_iommu_iova_to_phys,
320-
.domain_has_cap = gart_iommu_domain_has_cap,
321320
.pgsize_bitmap = GART_IOMMU_PGSIZES,
322321
};
323322

‎drivers/iommu/tegra-smmu.c‎

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -780,10 +780,9 @@ static phys_addr_t smmu_iommu_iova_to_phys(struct iommu_domain *domain,
780780
return PFN_PHYS(pfn);
781781
}
782782

783-
static int smmu_iommu_domain_has_cap(struct iommu_domain *domain,
784-
unsigned long cap)
783+
static bool smmu_iommu_capable(enum iommu_cap cap)
785784
{
786-
return 0;
785+
return false;
787786
}
788787

789788
static int smmu_iommu_attach_dev(struct iommu_domain *domain,
@@ -949,14 +948,14 @@ static void smmu_iommu_domain_destroy(struct iommu_domain *domain)
949948
}
950949

951950
static const struct iommu_ops smmu_iommu_ops = {
951+
.capable = smmu_iommu_capable,
952952
.domain_init = smmu_iommu_domain_init,
953953
.domain_destroy = smmu_iommu_domain_destroy,
954954
.attach_dev = smmu_iommu_attach_dev,
955955
.detach_dev = smmu_iommu_detach_dev,
956956
.map = smmu_iommu_map,
957957
.unmap = smmu_iommu_unmap,
958958
.iova_to_phys = smmu_iommu_iova_to_phys,
959-
.domain_has_cap = smmu_iommu_domain_has_cap,
960959
.pgsize_bitmap = SMMU_IOMMU_PGSIZES,
961960
};
962961

0 commit comments

Comments
 (0)