From abc579fe088477f736b05dd3ea2ef0b222e97ce1 Mon Sep 17 00:00:00 2001 From: Qingqing Zhou Date: Fri, 20 Dec 2019 11:06:43 +0800 Subject: [PATCH] iommu: arm-smmu: fix compile error if CONFIG_PCI disabled of_get_device_group() uses pci_bus_type, compilation error will happen if CONFIG_PCI is disabled, add checks for this config. Fixes: 6d696b37ead1 ("iommu: arm-smmu: Support default domain attributes") Change-Id: I7c5073b5bc5004600a4633b75fe7d5ea764cc656 Signed-off-by: Qingqing Zhou --- drivers/iommu/arm-smmu.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/iommu/arm-smmu.c b/drivers/iommu/arm-smmu.c index 3b6086fc0746..8fd784c1b0c8 100644 --- a/drivers/iommu/arm-smmu.c +++ b/drivers/iommu/arm-smmu.c @@ -2808,10 +2808,12 @@ static struct iommu_group *of_get_device_group(struct device *dev) if (ret > 0) return data.group; +#ifdef CONFIG_PCI ret = bus_for_each_dev(&pci_bus_type, NULL, &data, __bus_lookup_iommu_group); if (ret > 0) return data.group; +#endif group = generic_device_group(dev); if (IS_ERR(group))