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-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20240628101143.1508513-2-quic_mohs@quicinc.com>
Date: Fri, 28 Jun 2024 15:41:41 +0530
From: Mohammad Rafi Shaik <quic_mohs@...cinc.com>
To: Liam Girdwood <lgirdwood@...il.com>, Mark Brown <broonie@...nel.org>,
        Jaroslav Kysela <perex@...ex.cz>, Takashi Iwai <tiwai@...e.com>,
        "Prasad
 Kumpatla" <quic_pkumpatl@...cinc.com>,
        Mohammad Rafi Shaik
	<quic_mohs@...cinc.com>
CC: <linux-sound@...r.kernel.org>, <linux-kernel@...r.kernel.org>,
        <quic_rohkumar@...cinc.com>
Subject: [PATCH v1 1/3] ASoC: codecs: wcd937x-sdw: Fix Unbalanced pm_runtime_enable

Fix the unbalanced pm_runtime_enable! in wcd937x-sdw soundwire slave.

Fixes: c99a515ff153 ("ASoC: codecs: wcd937x-sdw: add SoundWire driver")
Signed-off-by: Mohammad Rafi Shaik <quic_mohs@...cinc.com>
---
 sound/soc/codecs/wcd937x-sdw.c | 18 ++++++++----------
 1 file changed, 8 insertions(+), 10 deletions(-)

diff --git a/sound/soc/codecs/wcd937x-sdw.c b/sound/soc/codecs/wcd937x-sdw.c
index a24d6c620dba..3abc8041406a 100644
--- a/sound/soc/codecs/wcd937x-sdw.c
+++ b/sound/soc/codecs/wcd937x-sdw.c
@@ -1067,13 +1067,15 @@ static int wcd9370_probe(struct sdw_slave *pdev,
 		wcd->ch_info = &wcd937x_sdw_rx_ch_info[0];
 	}
 
-	pm_runtime_set_autosuspend_delay(dev, 3000);
-	pm_runtime_use_autosuspend(dev);
-	pm_runtime_mark_last_busy(dev);
-	pm_runtime_set_active(dev);
-	pm_runtime_enable(dev);
 
-	return component_add(dev, &wcd937x_sdw_component_ops);
+	ret = component_add(dev, &wcd937x_sdw_component_ops);
+	if (ret)
+		return ret;
+
+	/* Set suspended until aggregate device is bind */
+	pm_runtime_set_suspended(dev);
+
+	return 0;
 }
 
 static int wcd9370_remove(struct sdw_slave *pdev)
@@ -1082,10 +1084,6 @@ static int wcd9370_remove(struct sdw_slave *pdev)
 
 	component_del(dev, &wcd937x_sdw_component_ops);
 
-	pm_runtime_disable(dev);
-	pm_runtime_set_suspended(dev);
-	pm_runtime_dont_use_autosuspend(dev);
-
 	return 0;
 }
 
-- 
2.25.1


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ