[PATCH 04/13] iommu: Rename iommu_get_instance()
Manoj Iyer
manoj.iyer at canonical.com
Tue May 16 20:11:27 UTC 2017
From: Joerg Roedel <jroedel at suse.de>
Rename the function to iommu_ops_from_fwnode(), because that
is what the function actually does. The new name is much
more descriptive about what the function does.
BugLink: http://bugs.launchpad.net/bugs/1688158
Signed-off-by: Joerg Roedel <jroedel at suse.de>
(cherry picked from commit 534766dfef999f7e7349bbd91cd19c1673792af3)
Signed-off-by: Manoj Iyer <manoj.iyer at canonical.com>
---
drivers/acpi/arm64/iort.c | 2 +-
drivers/iommu/iommu.c | 2 +-
include/linux/iommu.h | 4 ++--
include/linux/of_iommu.h | 2 +-
4 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/drivers/acpi/arm64/iort.c b/drivers/acpi/arm64/iort.c
index 95d64a327db0..72137eb2d9d5 100644
--- a/drivers/acpi/arm64/iort.c
+++ b/drivers/acpi/arm64/iort.c
@@ -631,7 +631,7 @@ static const struct iommu_ops *iort_iommu_xlate(struct device *dev,
if (!iort_fwnode)
return NULL;
- ops = iommu_get_instance(iort_fwnode);
+ ops = iommu_ops_from_fwnode(iort_fwnode);
if (!ops)
return NULL;
diff --git a/drivers/iommu/iommu.c b/drivers/iommu/iommu.c
index 78036e1bf400..67863b3e28d6 100644
--- a/drivers/iommu/iommu.c
+++ b/drivers/iommu/iommu.c
@@ -1808,7 +1808,7 @@ void iommu_register_instance(struct fwnode_handle *fwnode,
spin_unlock(&iommu_instance_lock);
}
-const struct iommu_ops *iommu_get_instance(struct fwnode_handle *fwnode)
+const struct iommu_ops *iommu_ops_from_fwnode(struct fwnode_handle *fwnode)
{
struct iommu_instance *instance;
const struct iommu_ops *ops = NULL;
diff --git a/include/linux/iommu.h b/include/linux/iommu.h
index bec3730dc009..ded067b805c9 100644
--- a/include/linux/iommu.h
+++ b/include/linux/iommu.h
@@ -366,7 +366,7 @@ void iommu_fwspec_free(struct device *dev);
int iommu_fwspec_add_ids(struct device *dev, u32 *ids, int num_ids);
void iommu_register_instance(struct fwnode_handle *fwnode,
const struct iommu_ops *ops);
-const struct iommu_ops *iommu_get_instance(struct fwnode_handle *fwnode);
+const struct iommu_ops *iommu_ops_from_fwnode(struct fwnode_handle *fwnode);
#else /* CONFIG_IOMMU_API */
@@ -608,7 +608,7 @@ static inline void iommu_register_instance(struct fwnode_handle *fwnode,
}
static inline
-const struct iommu_ops *iommu_get_instance(struct fwnode_handle *fwnode)
+const struct iommu_ops *iommu_ops_from_fwnode(struct fwnode_handle *fwnode)
{
return NULL;
}
diff --git a/include/linux/of_iommu.h b/include/linux/of_iommu.h
index 6a7fc5051099..66fcbc949899 100644
--- a/include/linux/of_iommu.h
+++ b/include/linux/of_iommu.h
@@ -39,7 +39,7 @@ static inline void of_iommu_set_ops(struct device_node *np,
static inline const struct iommu_ops *of_iommu_get_ops(struct device_node *np)
{
- return iommu_get_instance(&np->fwnode);
+ return iommu_ops_from_fwnode(&np->fwnode);
}
extern struct of_device_id __iommu_of_table;
--
2.11.0
More information about the kernel-team
mailing list