From fa1dabd4373219f929fc69fcb300f8b0417ba0e0 Mon Sep 17 00:00:00 2001 From: "Isaac J. Manjarres" Date: Mon, 6 Jan 2020 13:52:45 -0800 Subject: [PATCH] iommu/arm-smmu: Add missing iommu_device_unregister() The remove() callback for the ARM SMMU driver should ensure the SMMU devices that are being registered are no longer visible to the IOMMU framework, so remove the devices by invoking iommu_device_unregister(). Change-Id: I87dd7b4619e5b26b7eed64b04e3716f3b9c417c5 Signed-off-by: Isaac J. Manjarres --- drivers/iommu/arm-smmu.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/iommu/arm-smmu.c b/drivers/iommu/arm-smmu.c index ad564ca4b1db..6e0350aadcbd 100644 --- a/drivers/iommu/arm-smmu.c +++ b/drivers/iommu/arm-smmu.c @@ -4833,6 +4833,7 @@ static int arm_smmu_device_remove(struct platform_device *pdev) dev_err(&pdev->dev, "removing device with active domains!\n"); arm_smmu_bus_init(NULL); + iommu_device_unregister(&smmu->iommu); idr_destroy(&smmu->asid_idr); /* Turn the thing off */