]> git.ipfire.org Git - thirdparty/u-boot.git/commitdiff
iommu: fix compilation when CONFIG_PCI disabled
authorCaleb Connolly <caleb.connolly@linaro.org>
Mon, 11 Dec 2023 18:41:40 +0000 (18:41 +0000)
committerTom Rini <trini@konsulko.com>
Thu, 21 Dec 2023 16:59:49 +0000 (11:59 -0500)
The dev_pci_iommu_enable() function is only available when CONFIG_PCI is
enabled, replace the runtime check with a preprocessor one to fix
compilation with pci disabled.

Signed-off-by: Caleb Connolly <caleb.connolly@linaro.org>
drivers/iommu/iommu-uclass.c

index 72f123df55a559852baba1361c34b9daf81c17a8..98731d5e2c440722a0dca7989d066111d9f38f40 100644 (file)
@@ -100,9 +100,10 @@ int dev_iommu_enable(struct udevice *dev)
                dev->iommu = dev_iommu;
        }
 
-       if (CONFIG_IS_ENABLED(PCI) && count < 0 &&
-           device_is_on_pci_bus(dev))
+#if CONFIG_IS_ENABLED(PCI)
+       if (count < 0 && device_is_on_pci_bus(dev))
                return dev_pci_iommu_enable(dev);
+#endif
 
        return 0;
 }