Commit 843cb6dc authored by Joerg Roedel's avatar Joerg Roedel

iommu: Call remove_device call-back after driver release

Do not remove the device from the IOMMU while the driver is
still attached.
Signed-off-by: default avatarJoerg Roedel <jroedel@suse.de>
parent 8da30142
...@@ -779,7 +779,7 @@ static int iommu_bus_notifier(struct notifier_block *nb, ...@@ -779,7 +779,7 @@ static int iommu_bus_notifier(struct notifier_block *nb,
if (action == BUS_NOTIFY_ADD_DEVICE) { if (action == BUS_NOTIFY_ADD_DEVICE) {
if (ops->add_device) if (ops->add_device)
return ops->add_device(dev); return ops->add_device(dev);
} else if (action == BUS_NOTIFY_DEL_DEVICE) { } else if (action == BUS_NOTIFY_REMOVED_DEVICE) {
if (ops->remove_device && dev->iommu_group) { if (ops->remove_device && dev->iommu_group) {
ops->remove_device(dev); ops->remove_device(dev);
return 0; return 0;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment