diff options
author | Will Deacon <will@kernel.org> | 2024-07-12 16:55:43 +0100 |
---|---|---|
committer | Will Deacon <will@kernel.org> | 2024-07-12 16:55:43 +0100 |
commit | 342d3c1cbf6f181e202c9984c5f9c68b808f4f61 (patch) | |
tree | c7fc913545de6552594f7f5ebb1bd3df1d823a98 /drivers/acpi/viot.c | |
parent | c2b2e5c50330b29804339df4e7adf70e9f19b793 (diff) | |
parent | 3e36c15fc1cce65cccc93ed16f86d8ff9d2f9992 (diff) | |
download | linux-342d3c1cbf6f181e202c9984c5f9c68b808f4f61.tar.gz linux-342d3c1cbf6f181e202c9984c5f9c68b808f4f61.tar.bz2 linux-342d3c1cbf6f181e202c9984c5f9c68b808f4f61.zip |
Merge branch 'iommu/fwspec-ops-removal' into iommu/next
* iommu/fwspec-ops-removal:
iommu: Remove iommu_fwspec ops
OF: Simplify of_iommu_configure()
ACPI: Retire acpi_iommu_fwspec_ops()
iommu: Resolve fwspec ops automatically
iommu/mediatek-v1: Clean up redundant fwspec checks
[will: Fixed conflict in drivers/iommu/tegra-smmu.c between fwspec ops
removal and fwspec driver fix as per Robin and Jon]
Diffstat (limited to 'drivers/acpi/viot.c')
-rw-r--r-- | drivers/acpi/viot.c | 11 |
1 files changed, 2 insertions, 9 deletions
diff --git a/drivers/acpi/viot.c b/drivers/acpi/viot.c index c8025921c129..2aa69a2fba73 100644 --- a/drivers/acpi/viot.c +++ b/drivers/acpi/viot.c @@ -307,21 +307,14 @@ void __init acpi_viot_init(void) static int viot_dev_iommu_init(struct device *dev, struct viot_iommu *viommu, u32 epid) { - const struct iommu_ops *ops; - - if (!viommu) + if (!viommu || !IS_ENABLED(CONFIG_VIRTIO_IOMMU)) return -ENODEV; /* We're not translating ourself */ if (device_match_fwnode(dev, viommu->fwnode)) return -EINVAL; - ops = iommu_ops_from_fwnode(viommu->fwnode); - if (!ops) - return IS_ENABLED(CONFIG_VIRTIO_IOMMU) ? - -EPROBE_DEFER : -ENODEV; - - return acpi_iommu_fwspec_init(dev, epid, viommu->fwnode, ops); + return acpi_iommu_fwspec_init(dev, epid, viommu->fwnode); } static int viot_pci_dev_iommu_init(struct pci_dev *pdev, u16 dev_id, void *data) |