summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPuja Gupta <pujag@codeaurora.org>2016-09-12 17:41:07 -0700
committerPuja Gupta <pujag@codeaurora.org>2016-09-13 14:40:47 -0700
commitf68a3b56e414516da5d60dee8a18aaab9b869f13 (patch)
treefba6c818c60dafd84d3df07f2c8712c9614b0218
parentc2ab8cf0aeaa763d8e984678b6b610711795b78b (diff)
soc: qcom: pil: Correct notification path in subsys_stop
Send SUBSYS_BEFORE_SHUTDOWN notification to clients before doing graceful shutdown so that clients can do their end of housekeeping. CRs-Fixed: 1066446 Change-Id: I77b248c51914651aea4b27d7c5a3d5d784b1e542 Signed-off-by: Puja Gupta <pujag@codeaurora.org>
-rw-r--r--drivers/soc/qcom/subsystem_restart.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/soc/qcom/subsystem_restart.c b/drivers/soc/qcom/subsystem_restart.c
index 76d941ceb77e..6cfb8f7c836c 100644
--- a/drivers/soc/qcom/subsystem_restart.c
+++ b/drivers/soc/qcom/subsystem_restart.c
@@ -730,6 +730,7 @@ static void subsys_stop(struct subsys_device *subsys)
{
const char *name = subsys->desc->name;
+ notify_each_subsys_device(&subsys, 1, SUBSYS_BEFORE_SHUTDOWN, NULL);
if (!of_property_read_bool(subsys->desc->dev->of_node,
"qcom,pil-force-shutdown")) {
subsys_set_state(subsys, SUBSYS_OFFLINING);
@@ -739,7 +740,6 @@ static void subsys_stop(struct subsys_device *subsys)
pr_debug("Graceful shutdown failed for %s\n", name);
}
- notify_each_subsys_device(&subsys, 1, SUBSYS_BEFORE_SHUTDOWN, NULL);
subsys->desc->shutdown(subsys->desc, false);
subsys_set_state(subsys, SUBSYS_OFFLINE);
disable_all_irqs(subsys);