]> Git Repo - J-linux.git/commitdiff
wifi: ath11k: Use iommu_paging_domain_alloc()
authorLu Baolu <[email protected]>
Mon, 10 Jun 2024 08:55:45 +0000 (16:55 +0800)
committerWill Deacon <[email protected]>
Thu, 4 Jul 2024 13:09:33 +0000 (14:09 +0100)
An iommu domain is allocated in ath11k_ahb_fw_resources_init() and is
attached to ab_ahb->fw.dev in the same function.

Use iommu_paging_domain_alloc() to make it explicit.

Signed-off-by: Lu Baolu <[email protected]>
Acked-by: Jeff Johnson <[email protected]>
Reviewed-by: Jason Gunthorpe <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Will Deacon <[email protected]>
drivers/net/wireless/ath/ath11k/ahb.c

index ca0f17ddebbaac749a4b04fa11d72f378ab0a027..a469647719f96c95a7feaaed4c1292ecbedc63ad 100644 (file)
@@ -1001,10 +1001,10 @@ static int ath11k_ahb_fw_resources_init(struct ath11k_base *ab)
 
        ab_ahb->fw.dev = &pdev->dev;
 
-       iommu_dom = iommu_domain_alloc(&platform_bus_type);
-       if (!iommu_dom) {
+       iommu_dom = iommu_paging_domain_alloc(ab_ahb->fw.dev);
+       if (IS_ERR(iommu_dom)) {
                ath11k_err(ab, "failed to allocate iommu domain\n");
-               ret = -ENOMEM;
+               ret = PTR_ERR(iommu_dom);
                goto err_unregister;
        }
 
This page took 0.074366 seconds and 4 git commands to generate.