From f68a3b56e414516da5d60dee8a18aaab9b869f13 Mon Sep 17 00:00:00 2001 From: Puja Gupta Date: Mon, 12 Sep 2016 17:41:07 -0700 Subject: [PATCH] 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 --- drivers/soc/qcom/subsystem_restart.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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);