Skip to content

Commit

Permalink
iommu: Rename iommu_get_instance()
Browse files Browse the repository at this point in the history
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.

Signed-off-by: Joerg Roedel <jroedel@suse.de>
  • Loading branch information
Joerg Roedel committed Feb 10, 2017
1 parent 797a8b4 commit 534766d
Showing 4 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion drivers/acpi/arm64/iort.c
Original file line number Diff line number Diff line change
@@ -536,7 +536,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;

2 changes: 1 addition & 1 deletion drivers/iommu/iommu.c
Original file line number Diff line number Diff line change
@@ -1664,7 +1664,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;
4 changes: 2 additions & 2 deletions include/linux/iommu.h
Original file line number Diff line number Diff line change
@@ -354,7 +354,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 */

@@ -590,7 +590,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;
}
2 changes: 1 addition & 1 deletion include/linux/of_iommu.h
Original file line number Diff line number Diff line change
@@ -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;

0 comments on commit 534766d

Please sign in to comment.