提交 6b68835b 编写于 作者: Q Qian Cai 提交者: Will Deacon

ACPI/IORT: Fix build when CONFIG_IOMMU_API=n

Commit 8097e53e ("ACPI/IORT: Use helper functions to access
dev->iommu_fwspec") changed by mistake the iort_fwspec_iommu_ops() stub
definition (compiled in when CONFIG_IOMMU_API=n), that caused the
following compilation failure:

drivers/acpi/arm64/iort.c:880:1: error: expected identifier or
'(' before '{' token
 { return NULL; }
 ^
drivers/acpi/arm64/iort.c:879:39: warning: 'iort_fwspec_iommu_ops'
used but never defined
 static inline const struct iommu_ops *iort_fwspec_iommu_ops(struct device *dev);
                                       ^~~~~~~~~~~~~~~~~~~~~

Fix it.

Fixes: 8097e53e ("ACPI/IORT: Use helper functions to access dev->iommu_fwspec")
Signed-off-by: NQian Cai <cai@lca.pw>
[lorenzo.pieralisi@arm.com: updated tags and log]
Signed-off-by: NLorenzo Pieralisi <lorenzo.pieralisi@arm.com>
Acked-by: NHanjun Guo <hanjun.guo@linaro.org>
Cc: Will Deacon <will.deacon@arm.com>
Cc: Sudeep Holla <sudeep.holla@arm.com>
Cc: Catalin Marinas <catalin.marinas@arm.com>
Cc: Joerg Roedel <jroedel@suse.de>
Signed-off-by: NWill Deacon <will.deacon@arm.com>
上级 bfeffd15
...@@ -876,7 +876,7 @@ int iort_iommu_msi_get_resv_regions(struct device *dev, struct list_head *head) ...@@ -876,7 +876,7 @@ int iort_iommu_msi_get_resv_regions(struct device *dev, struct list_head *head)
return (resv == its->its_count) ? resv : -ENODEV; return (resv == its->its_count) ? resv : -ENODEV;
} }
#else #else
static inline const struct iommu_ops *iort_fwspec_iommu_ops(struct device *dev); static inline const struct iommu_ops *iort_fwspec_iommu_ops(struct device *dev)
{ return NULL; } { return NULL; }
static inline int iort_add_device_replay(const struct iommu_ops *ops, static inline int iort_add_device_replay(const struct iommu_ops *ops,
struct device *dev) struct device *dev)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册