]> git.baikalelectronics.ru Git - kernel.git/commit
driver core: Add BUS_NOTIFY_REMOVED_DEVICE event
authorJoerg Roedel <jroedel@suse.de>
Tue, 30 Sep 2014 11:02:02 +0000 (13:02 +0200)
committerJoerg Roedel <jroedel@suse.de>
Thu, 2 Oct 2014 09:14:34 +0000 (11:14 +0200)
commitcae0bf9ebfa9faac8ce6b98f80782d5280d4d75e
tree876f2845a2c02b0d1f23eb6ca02aad986807132e
parenta934b0f87b38ff5edd511b5df466da7e899a4e08
driver core: Add BUS_NOTIFY_REMOVED_DEVICE event

This event closes an important gap in the bus notifiers.
There is already the BUS_NOTIFY_DEL_DEVICE event, but that
is sent when the device is still bound to its device driver.

This is too early for the IOMMU code to destroy any mappings
for the device, as they might still be in use by the driver.

The new BUS_NOTIFY_REMOVED_DEVICE event introduced with this
patch closes this gap as it is sent when the device is
already unbound from its device driver and almost completly
removed from the driver core.

With this event the IOMMU code can safely destroy any
mappings and other data structures when a device is removed.

Signed-off-by: Joerg Roedel <jroedel@suse.de>
Acked-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Tested-by: Jerry Hoemann <jerry.hoemann@hp.com>
drivers/base/core.c
include/linux/device.h