mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-30 19:51:31 -04:00
rapidio: add shutdown notification for RapidIO devices
Add bus-specific callback to stop RapidIO devices during a system shutdown. Signed-off-by: Alexandre Bounine <[email protected]> Cc: Matt Porter <[email protected]> Cc: Aurelien Jacquiot <[email protected]> Cc: Andre van Herk <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
This commit is contained in:
parent
dbe74afe6a
commit
83dc2cbc11
2 changed files with 14 additions and 0 deletions
|
|
@ -131,6 +131,17 @@ static int rio_device_remove(struct device *dev)
|
|||
return 0;
|
||||
}
|
||||
|
||||
static void rio_device_shutdown(struct device *dev)
|
||||
{
|
||||
struct rio_dev *rdev = to_rio_dev(dev);
|
||||
struct rio_driver *rdrv = rdev->driver;
|
||||
|
||||
dev_dbg(dev, "RIO: %s\n", __func__);
|
||||
|
||||
if (rdrv && rdrv->shutdown)
|
||||
rdrv->shutdown(rdev);
|
||||
}
|
||||
|
||||
/**
|
||||
* rio_register_driver - register a new RIO driver
|
||||
* @rdrv: the RIO driver structure to register
|
||||
|
|
@ -229,6 +240,7 @@ struct bus_type rio_bus_type = {
|
|||
.bus_groups = rio_bus_groups,
|
||||
.probe = rio_device_probe,
|
||||
.remove = rio_device_remove,
|
||||
.shutdown = rio_device_shutdown,
|
||||
.uevent = rio_uevent,
|
||||
};
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue