Do not disable driver and bus shutdown hook when class shutdown hook is set.
authorMichal Suchanek <msuchanek@suse.de>
Fri, 11 Aug 2017 13:44:43 +0000 (15:44 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 28 Aug 2017 16:02:46 +0000 (18:02 +0200)
commit7521621e600aeefe5ffcc1f90ae26a42fc20c452
tree9aa634ae98e149c28f4e301f06b9352b0a74ac1a
parentdf44d30d28cb7dd4f3dc105d843a4a01f5dfc860
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>
drivers/base/core.c
drivers/char/tpm/tpm-chip.c
include/linux/device.h