Patch "ASoC: cs35l41: Undo runtime PM changes at driver exit time" has been added to the 6.1-stable tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This is a note to let you know that I've just added the patch titled

    ASoC: cs35l41: Undo runtime PM changes at driver exit time

to the 6.1-stable tree which can be found at:
    http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
     asoc-cs35l41-undo-runtime-pm-changes-at-driver-exit-.patch
and it can be found in the queue-6.1 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@xxxxxxxxxxxxxxx> know about it.



commit a927973ea776f6192d3c867914f96e25ffc1c74d
Author: Cristian Ciocaltea <cristian.ciocaltea@xxxxxxxxxxxxx>
Date:   Thu Sep 7 20:10:05 2023 +0300

    ASoC: cs35l41: Undo runtime PM changes at driver exit time
    
    [ Upstream commit 2d5661e6008ae1a1cd6df7cc844908fb8b982c58 ]
    
    According to the documentation, drivers are responsible for undoing at
    removal time all runtime PM changes done during probing.
    
    Hence, add the missing calls to pm_runtime_dont_use_autosuspend(), which
    are necessary for undoing pm_runtime_use_autosuspend().
    
    Note this would have been handled implicitly by
    devm_pm_runtime_enable(), but there is a need to continue using
    pm_runtime_enable()/pm_runtime_disable() in order to ensure the runtime
    PM is disabled as soon as the remove() callback is entered.
    
    Fixes: f517ba4924ad ("ASoC: cs35l41: Add support for hibernate memory retention mode")
    Signed-off-by: Cristian Ciocaltea <cristian.ciocaltea@xxxxxxxxxxxxx>
    Reviewed-by: Takashi Iwai <tiwai@xxxxxxx>
    Link: https://lore.kernel.org/r/20230907171010.1447274-7-cristian.ciocaltea@xxxxxxxxxxxxx
    Signed-off-by: Mark Brown <broonie@xxxxxxxxxx>
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/sound/soc/codecs/cs35l41.c b/sound/soc/codecs/cs35l41.c
index e428898e42112..e91c1a4640e46 100644
--- a/sound/soc/codecs/cs35l41.c
+++ b/sound/soc/codecs/cs35l41.c
@@ -1338,6 +1338,7 @@ int cs35l41_probe(struct cs35l41_private *cs35l41, const struct cs35l41_hw_cfg *
 	return 0;
 
 err_pm:
+	pm_runtime_dont_use_autosuspend(cs35l41->dev);
 	pm_runtime_disable(cs35l41->dev);
 	pm_runtime_put_noidle(cs35l41->dev);
 
@@ -1354,6 +1355,7 @@ EXPORT_SYMBOL_GPL(cs35l41_probe);
 void cs35l41_remove(struct cs35l41_private *cs35l41)
 {
 	pm_runtime_get_sync(cs35l41->dev);
+	pm_runtime_dont_use_autosuspend(cs35l41->dev);
 	pm_runtime_disable(cs35l41->dev);
 
 	regmap_write(cs35l41->regmap, CS35L41_IRQ1_MASK1, 0xFFFFFFFF);



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux