]> git.baikalelectronics.ru Git - kernel.git/commitdiff
ASoC: codecs: Fix misplaced lpass_macro_pds_exit call
authorSrinivasa Rao Mandadapu <quic_srivasam@quicinc.com>
Tue, 15 Mar 2022 14:45:31 +0000 (20:15 +0530)
committerMark Brown <broonie@kernel.org>
Wed, 16 Mar 2022 16:39:32 +0000 (16:39 +0000)
Update power domains exit function calling from runtime resume
to remove function which was wrongly placed and causing crash in
device suspend and resume.

Fixes: b9e118d66804 ("ASoC: codecs: Add power domains support in digital macro codecs")
Signed-off-by: Srinivasa Rao Mandadapu <quic_srivasam@quicinc.com>
Co-developed-by: Venkata Prasad Potturu <quic_potturu@quicinc.com>
Signed-off-by: Venkata Prasad Potturu <quic_potturu@quicinc.com>
Link: https://lore.kernel.org/r/1647355531-4150-1-git-send-email-quic_srivasam@quicinc.com
Signed-off-by: Mark Brown <broonie@kernel.org>
sound/soc/codecs/lpass-tx-macro.c
sound/soc/codecs/lpass-va-macro.c

index b492d5984819d558138c3d93f76461ffe5d9daf4..714a411d53379efff549329b3c5ca7a7666dd971 100644 (file)
@@ -1920,6 +1920,8 @@ static int tx_macro_remove(struct platform_device *pdev)
        clk_disable_unprepare(tx->npl);
        clk_disable_unprepare(tx->fsgen);
 
+       lpass_macro_pds_exit(tx->pds);
+
        return 0;
 }
 
@@ -1964,8 +1966,6 @@ static int __maybe_unused tx_macro_runtime_resume(struct device *dev)
        regcache_sync(tx->regmap);
        tx->reset_swr = true;
 
-       lpass_macro_pds_exit(tx->pds);
-
        return 0;
 err_fsgen:
        clk_disable_unprepare(tx->npl);
index 275f2cd78c9c6b12de34dd2373bd4bdc3c16efc0..37674f68616b010901cd13b71645f811937b08e2 100644 (file)
@@ -1503,6 +1503,8 @@ static int va_macro_remove(struct platform_device *pdev)
        clk_disable_unprepare(va->dcodec);
        clk_disable_unprepare(va->macro);
 
+       lpass_macro_pds_exit(va->pds);
+
        return 0;
 }
 
@@ -1532,8 +1534,6 @@ static int __maybe_unused va_macro_runtime_resume(struct device *dev)
        regcache_cache_only(va->regmap, false);
        regcache_sync(va->regmap);
 
-       lpass_macro_pds_exit(va->pds);
-
        return 0;
 }