From: Joerg Roedel Date: Wed, 1 Apr 2015 12:58:44 +0000 (+0200) Subject: iommu/amd: Use BUS_NOTIFY_REMOVED_DEVICE X-Git-Tag: v4.1-rc1~70^2^3~8 X-Git-Url: https://asedeno.scripts.mit.edu/gitweb/?a=commitdiff_plain;h=6c5cc8015793cdfd56d9997bcfddf2740ff716c5;p=linux.git iommu/amd: Use BUS_NOTIFY_REMOVED_DEVICE Use the new device-notifier event instead of the old BUS_NOTIFY_DEL_DEVICE to make sure the device driver had a chance to uninit the device before all its mappings are teared down. Tested-by: Suravee Suthikulpanit Signed-off-by: Joerg Roedel --- diff --git a/drivers/iommu/amd_iommu.c b/drivers/iommu/amd_iommu.c index 48882c126245..8a1dea4d0d26 100644 --- a/drivers/iommu/amd_iommu.c +++ b/drivers/iommu/amd_iommu.c @@ -2467,7 +2467,7 @@ static int device_change_notifier(struct notifier_block *nb, dev->archdata.dma_ops = &amd_iommu_dma_ops; break; - case BUS_NOTIFY_DEL_DEVICE: + case BUS_NOTIFY_REMOVED_DEVICE: iommu_uninit_device(dev);