diff --git a/drivers/iommu/amd/iommu.c b/drivers/iommu/amd/iommu.c index 54465e041155..91981c8a9614 100644 --- a/drivers/iommu/amd/iommu.c +++ b/drivers/iommu/amd/iommu.c @@ -488,6 +488,10 @@ static void setup_aliases(struct amd_iommu *iommu, struct device *dev) clone_aliases(iommu, dev); } +/* + * We keep dev_data around for unplugged devices and reuse it when the + * device is re-plugged - not doing so would introduce a ton of races. + */ static struct iommu_dev_data *find_dev_data(struct amd_iommu *iommu, u16 devid) { struct iommu_dev_data *dev_data; @@ -2551,18 +2555,6 @@ static struct iommu_device *amd_iommu_probe_device(struct device *dev) return iommu_dev; } -static void amd_iommu_release_device(struct device *dev) -{ - struct iommu_dev_data *dev_data = dev_iommu_priv_get(dev); - - WARN_ON(dev_data->domain); - - /* - * We keep dev_data around for unplugged devices and reuse it when the - * device is re-plugged - not doing so would introduce a ton of races. - */ -} - static struct iommu_group *amd_iommu_device_group(struct device *dev) { if (dev_is_pci(dev)) @@ -3266,7 +3258,6 @@ const struct iommu_ops amd_iommu_ops = { .domain_alloc_paging_flags = amd_iommu_domain_alloc_paging_flags, .domain_alloc_sva = amd_iommu_domain_alloc_sva, .probe_device = amd_iommu_probe_device, - .release_device = amd_iommu_release_device, .device_group = amd_iommu_device_group, .get_resv_regions = amd_iommu_get_resv_regions, .is_attach_deferred = amd_iommu_is_attach_deferred,