lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20211209200830.145005-1-daniel.baluta@oss.nxp.com>
Date:   Thu,  9 Dec 2021 22:08:30 +0200
From:   Daniel Baluta <daniel.baluta@....nxp.com>
To:     broonie@...nel.org
Cc:     pierre-louis.bossart@...ux.intel.com, lgirdwood@...il.com,
        ranjani.sridharan@...ux.intel.com, kai.vehmanen@...ux.intel.com,
        alsa-devel@...a-project.org, linux-kernel@...r.kernel.org,
        linux-mediatek@...ts.infradead.org,
        Allen-KH Cheng <Allen-KH.Cheng@...iatek.com>,
        Daniel Baluta <daniel.baluta@....com>,
        Paul Olaru <paul.olaru@....nxp.com>
Subject: [PATCH v2] ASoC: SOF: Remove pm_runtime_put_autosuspend() for SOF OF device

From: Allen-KH Cheng <Allen-KH.Cheng@...iatek.com>

In SOF OF device, pm_runtime_put_autosuspend() is not
matching any pm_runtime_get_sync().

This is imbalanced for PM runtime.

Also, for consistency we call pm_runtime_mark_last_busy()
before enabling PM runtime.

1. Remove pm_runtime_put_autosuspend() in probe_complete
2. Reorder PM runtime calls int probe_complete

Signed-off-by: Allen-KH Cheng <Allen-KH.Cheng@...iatek.com>
Reviewed-by: Daniel Baluta <daniel.baluta@....com>
Reviewed-by: Paul Olaru <paul.olaru@....nxp.com>
Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@...ux.intel.com>
Signed-off-by: Daniel Baluta <daniel.baluta@....com>
---
Changes since v1:
- Added my own signed-off-by

 sound/soc/sof/sof-of-dev.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/sound/soc/sof/sof-of-dev.c b/sound/soc/sof/sof-of-dev.c
index 412cbb824b84..b0089698eecb 100644
--- a/sound/soc/sof/sof-of-dev.c
+++ b/sound/soc/sof/sof-of-dev.c
@@ -74,11 +74,9 @@ static void sof_of_probe_complete(struct device *dev)
 	/* allow runtime_pm */
 	pm_runtime_set_autosuspend_delay(dev, SND_SOF_SUSPEND_DELAY_MS);
 	pm_runtime_use_autosuspend(dev);
+	pm_runtime_mark_last_busy(dev);
 	pm_runtime_set_active(dev);
 	pm_runtime_enable(dev);
-
-	pm_runtime_mark_last_busy(dev);
-	pm_runtime_put_autosuspend(dev);
 }
 
 static int sof_of_probe(struct platform_device *pdev)
-- 
2.27.0

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ