From 7f6462ebd7fea03edcd5f4ca4f92523de7f8766f Mon Sep 17 00:00:00 2001 From: Ramprasad Katkam Date: Tue, 6 Nov 2018 11:51:22 +0530 Subject: [PATCH] soc: swr-mstr: Reinit clk off signal before waiting Reinit clk off signal before waiting to avoid false positives because of the signal complete that happened prior to the waiting. Change-Id: I678fdc8589039d9f59e6590a4899309dad479181 Signed-off-by: Ramprasad Katkam --- soc/swr-mstr-ctrl.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/soc/swr-mstr-ctrl.c b/soc/swr-mstr-ctrl.c index 80dd5e8d3f76..4e2b261a076a 100644 --- a/soc/swr-mstr-ctrl.c +++ b/soc/swr-mstr-ctrl.c @@ -2110,9 +2110,10 @@ int swrm_wcd_notify(struct platform_device *pdev, u32 id, void *data) break; case SWR_DEVICE_SSR_UP: /* wait for clk voting to be zero */ + reinit_completion(&swrm->clk_off_complete); if (swrm->clk_ref_count && !wait_for_completion_timeout(&swrm->clk_off_complete, - (1 * HZ/100))) + msecs_to_jiffies(200))) dev_err(swrm->dev, "%s: clock voting not zero\n", __func__);