Skip to content

Commit 0c06901

Browse files
LuBaolujoergroedel
authored andcommitted
media: nvidia: tegra: Use iommu_paging_domain_alloc()
An iommu domain is allocated in tegra_vde_iommu_init() and is attached to vde->dev. Use iommu_paging_domain_alloc() to make it explicit. Signed-off-by: Lu Baolu <[email protected]> Reviewed-by: Jason Gunthorpe <[email protected]> Acked-by: Thierry Reding <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Joerg Roedel <[email protected]>
1 parent fae93d8 commit 0c06901

File tree

1 file changed

+4
-3
lines changed
  • drivers/media/platform/nvidia/tegra-vde

1 file changed

+4
-3
lines changed

drivers/media/platform/nvidia/tegra-vde/iommu.c

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -78,9 +78,10 @@ int tegra_vde_iommu_init(struct tegra_vde *vde)
7878
arm_iommu_release_mapping(mapping);
7979
}
8080
#endif
81-
vde->domain = iommu_domain_alloc(&platform_bus_type);
82-
if (!vde->domain) {
83-
err = -ENOMEM;
81+
vde->domain = iommu_paging_domain_alloc(dev);
82+
if (IS_ERR(vde->domain)) {
83+
err = PTR_ERR(vde->domain);
84+
vde->domain = NULL;
8485
goto put_group;
8586
}
8687

0 commit comments

Comments
 (0)