summaryrefslogtreecommitdiffstats
path: root/include/linux/device.h
diff options
context:
space:
mode:
authorMichal Suchanek2017-08-11 15:44:43 +0200
committerGreg Kroah-Hartman2017-08-28 18:02:46 +0200
commit7521621e600aeefe5ffcc1f90ae26a42fc20c452 (patch)
tree9aa634ae98e149c28f4e301f06b9352b0a74ac1a /include/linux/device.h
parentbase: topology: constify attribute_group structures. (diff)
downloadkernel-qcow2-linux-7521621e600aeefe5ffcc1f90ae26a42fc20c452.tar.gz
kernel-qcow2-linux-7521621e600aeefe5ffcc1f90ae26a42fc20c452.tar.xz
kernel-qcow2-linux-7521621e600aeefe5ffcc1f90ae26a42fc20c452.zip
Do not disable driver and bus shutdown hook when class shutdown hook is set.
As seen from the implementation of the single class shutdown hook this is not very sound design. Rename the class shutdown hook to shutdown_pre to make it clear it runs before the driver shutdown hook. Signed-off-by: Michal Suchanek <msuchanek@suse.de> Reviewed-by: Jarkko Sakkinen <jarkko.sakkinen@linux.intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'include/linux/device.h')
-rw-r--r--include/linux/device.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/include/linux/device.h b/include/linux/device.h
index d5bcc5f109eb..c6f27207dbe8 100644
--- a/include/linux/device.h
+++ b/include/linux/device.h
@@ -375,7 +375,7 @@ int subsys_virtual_register(struct bus_type *subsys,
* @suspend: Used to put the device to sleep mode, usually to a low power
* state.
* @resume: Used to bring the device from the sleep mode.
- * @shutdown: Called at shut-down time to quiesce the device.
+ * @shutdown_pre: Called at shut-down time before driver shutdown.
* @ns_type: Callbacks so sysfs can detemine namespaces.
* @namespace: Namespace of the device belongs to this class.
* @pm: The default device power management operations of this class.
@@ -404,7 +404,7 @@ struct class {
int (*suspend)(struct device *dev, pm_message_t state);
int (*resume)(struct device *dev);
- int (*shutdown)(struct device *dev);
+ int (*shutdown_pre)(struct device *dev);
const struct kobj_ns_type_operations *ns_type;
const void *(*namespace)(struct device *dev);