Commit 6990ec79 authored by Joerg Roedel's avatar Joerg Roedel

ACPI/IORT: Remove direct access of dev->iommu_fwspec

Use the accessor functions instead of directly dereferencing
dev->iommu_fwspec.
Signed-off-by: default avatarJoerg Roedel <jroedel@suse.de>
Tested-by: default avatarHanjun Guo <guohanjun@huawei.com>
Reviewed-by: default avatarJean-Philippe Brucker <jean-philippe@linaro.org>
Link: https://lore.kernel.org/r/20200326150841.10083-3-joro@8bytes.org
parent 0008d0c3
...@@ -1015,6 +1015,7 @@ const struct iommu_ops *iort_iommu_configure(struct device *dev) ...@@ -1015,6 +1015,7 @@ const struct iommu_ops *iort_iommu_configure(struct device *dev)
return ops; return ops;
if (dev_is_pci(dev)) { if (dev_is_pci(dev)) {
struct iommu_fwspec *fwspec;
struct pci_bus *bus = to_pci_dev(dev)->bus; struct pci_bus *bus = to_pci_dev(dev)->bus;
struct iort_pci_alias_info info = { .dev = dev }; struct iort_pci_alias_info info = { .dev = dev };
...@@ -1027,8 +1028,9 @@ const struct iommu_ops *iort_iommu_configure(struct device *dev) ...@@ -1027,8 +1028,9 @@ const struct iommu_ops *iort_iommu_configure(struct device *dev)
err = pci_for_each_dma_alias(to_pci_dev(dev), err = pci_for_each_dma_alias(to_pci_dev(dev),
iort_pci_iommu_init, &info); iort_pci_iommu_init, &info);
if (!err && iort_pci_rc_supports_ats(node)) fwspec = dev_iommu_fwspec_get(dev);
dev->iommu_fwspec->flags |= IOMMU_FWSPEC_PCI_RC_ATS; if (fwspec && iort_pci_rc_supports_ats(node))
fwspec->flags |= IOMMU_FWSPEC_PCI_RC_ATS;
} else { } else {
int i = 0; int i = 0;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment