Skip to content

Commit 0ecdebb

Browse files
thierryredingjoergroedel
authored andcommitted
iommu: intel: Use generic_iommu_put_resv_regions()
Use the new standard function instead of open-coding it. Cc: David Woodhouse <[email protected]> Signed-off-by: Thierry Reding <[email protected]> Signed-off-by: Joerg Roedel <[email protected]>
1 parent 55c2564 commit 0ecdebb

File tree

1 file changed

+1
-10
lines changed

1 file changed

+1
-10
lines changed

drivers/iommu/intel-iommu.c

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -5745,15 +5745,6 @@ static void intel_iommu_get_resv_regions(struct device *device,
57455745
list_add_tail(&reg->list, head);
57465746
}
57475747

5748-
static void intel_iommu_put_resv_regions(struct device *dev,
5749-
struct list_head *head)
5750-
{
5751-
struct iommu_resv_region *entry, *next;
5752-
5753-
list_for_each_entry_safe(entry, next, head, list)
5754-
kfree(entry);
5755-
}
5756-
57575748
int intel_iommu_enable_pasid(struct intel_iommu *iommu, struct device *dev)
57585749
{
57595750
struct device_domain_info *info;
@@ -5988,7 +5979,7 @@ const struct iommu_ops intel_iommu_ops = {
59885979
.add_device = intel_iommu_add_device,
59895980
.remove_device = intel_iommu_remove_device,
59905981
.get_resv_regions = intel_iommu_get_resv_regions,
5991-
.put_resv_regions = intel_iommu_put_resv_regions,
5982+
.put_resv_regions = generic_iommu_put_resv_regions,
59925983
.apply_resv_region = intel_iommu_apply_resv_region,
59935984
.device_group = pci_device_group,
59945985
.dev_has_feat = intel_iommu_dev_has_feat,

0 commit comments

Comments
 (0)