Skip to content

Commit e223864

Browse files
jgunthorpejoergroedel
authored andcommitted
iommu: Make iommu_release_device() static
This is not called outside the core code, and indeed cannot be called correctly outside the bus notifier. Make it static. Signed-off-by: Jason Gunthorpe <jgg@nvidia.com> Reviewed-by: Robin Murphy <robin.murphy@arm.com> Link: https://lore.kernel.org/r/0-v1-c3da18124d2d+56-rm_iommu_release_jgg@nvidia.com Signed-off-by: Joerg Roedel <jroedel@suse.de>
1 parent 99b5726 commit e223864

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

drivers/iommu/iommu.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,7 @@ static const char * const iommu_group_resv_type_string[] = {
8787

8888
static int iommu_bus_notifier(struct notifier_block *nb,
8989
unsigned long action, void *data);
90+
static void iommu_release_device(struct device *dev);
9091
static int iommu_alloc_default_domain(struct iommu_group *group,
9192
struct device *dev);
9293
static struct iommu_domain *__iommu_domain_alloc(struct bus_type *bus,
@@ -493,7 +494,7 @@ static void __iommu_group_release_device(struct iommu_group *group,
493494
kobject_put(group->devices_kobj);
494495
}
495496

496-
void iommu_release_device(struct device *dev)
497+
static void iommu_release_device(struct device *dev)
497498
{
498499
struct iommu_group *group = dev->iommu_group;
499500
struct group_device *device;

include/linux/iommu.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -699,7 +699,6 @@ static inline void dev_iommu_priv_set(struct device *dev, void *priv)
699699
}
700700

701701
int iommu_probe_device(struct device *dev);
702-
void iommu_release_device(struct device *dev);
703702

704703
int iommu_dev_enable_feature(struct device *dev, enum iommu_dev_features f);
705704
int iommu_dev_disable_feature(struct device *dev, enum iommu_dev_features f);

0 commit comments

Comments
 (0)