Skip to content

Commit 534766d

Browse files
committed
iommu: Rename iommu_get_instance()
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>
1 parent 797a8b4 commit 534766d

File tree

4 files changed

+5
-5
lines changed

4 files changed

+5
-5
lines changed

drivers/acpi/arm64/iort.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -536,7 +536,7 @@ static const struct iommu_ops *iort_iommu_xlate(struct device *dev,
536536
if (!iort_fwnode)
537537
return NULL;
538538

539-
ops = iommu_get_instance(iort_fwnode);
539+
ops = iommu_ops_from_fwnode(iort_fwnode);
540540
if (!ops)
541541
return NULL;
542542

drivers/iommu/iommu.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1664,7 +1664,7 @@ void iommu_register_instance(struct fwnode_handle *fwnode,
16641664
spin_unlock(&iommu_instance_lock);
16651665
}
16661666

1667-
const struct iommu_ops *iommu_get_instance(struct fwnode_handle *fwnode)
1667+
const struct iommu_ops *iommu_ops_from_fwnode(struct fwnode_handle *fwnode)
16681668
{
16691669
struct iommu_instance *instance;
16701670
const struct iommu_ops *ops = NULL;

include/linux/iommu.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -354,7 +354,7 @@ void iommu_fwspec_free(struct device *dev);
354354
int iommu_fwspec_add_ids(struct device *dev, u32 *ids, int num_ids);
355355
void iommu_register_instance(struct fwnode_handle *fwnode,
356356
const struct iommu_ops *ops);
357-
const struct iommu_ops *iommu_get_instance(struct fwnode_handle *fwnode);
357+
const struct iommu_ops *iommu_ops_from_fwnode(struct fwnode_handle *fwnode);
358358

359359
#else /* CONFIG_IOMMU_API */
360360

@@ -590,7 +590,7 @@ static inline void iommu_register_instance(struct fwnode_handle *fwnode,
590590
}
591591

592592
static inline
593-
const struct iommu_ops *iommu_get_instance(struct fwnode_handle *fwnode)
593+
const struct iommu_ops *iommu_ops_from_fwnode(struct fwnode_handle *fwnode)
594594
{
595595
return NULL;
596596
}

include/linux/of_iommu.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ static inline void of_iommu_set_ops(struct device_node *np,
3939

4040
static inline const struct iommu_ops *of_iommu_get_ops(struct device_node *np)
4141
{
42-
return iommu_get_instance(&np->fwnode);
42+
return iommu_ops_from_fwnode(&np->fwnode);
4343
}
4444

4545
extern struct of_device_id __iommu_of_table;

0 commit comments

Comments
 (0)