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 <qqzhou@codeaurora.org>
This commit is contained in:
Qingqing Zhou 2019-12-20 11:06:43 +08:00 • committed by Gerrit - the friendly Code Review server
commit abc579fe08

View file

@ -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))