Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

ASoC: codecs: wcd938x-sdw: remove redundant runtime pm calls

Component bind callbacks already does runtime pm calls, soundwire codec
also tries to do the exactly same thing resulting in Unbalanced
pm_runtime_enable and disable calls.

Remove the redundant calls from wcd938x-sdw driver.

Reported-by: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com>
Fixes: ebaf88c0546d ("ASoC: codecs: wcd-common: move component ops to common")
Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@oss.qualcomm.com>
Link: https://patch.msgid.link/20251008145801.3479-1-srinivas.kandagatla@oss.qualcomm.com
Signed-off-by: Mark Brown <broonie@kernel.org>

authored by

Srinivas Kandagatla and committed by
Mark Brown
d5cda96d 57b00ab3

+4 -18
+4 -18
sound/soc/codecs/wcd938x-sdw.c
··· 1207 1207 regcache_cache_only(wcd->regmap, true); 1208 1208 } 1209 1209 1210 - pm_runtime_set_autosuspend_delay(dev, 3000); 1211 - pm_runtime_use_autosuspend(dev); 1212 - pm_runtime_mark_last_busy(dev); 1213 - pm_runtime_set_active(dev); 1214 - pm_runtime_enable(dev); 1215 - 1216 1210 ret = component_add(dev, &wcd_sdw_component_ops); 1217 1211 if (ret) 1218 - goto err_disable_rpm; 1212 + return ret; 1213 + 1214 + /* Set suspended until aggregate device is bind */ 1215 + pm_runtime_set_suspended(dev); 1219 1216 1220 1217 return 0; 1221 - 1222 - err_disable_rpm: 1223 - pm_runtime_disable(dev); 1224 - pm_runtime_set_suspended(dev); 1225 - pm_runtime_dont_use_autosuspend(dev); 1226 - 1227 - return ret; 1228 1218 } 1229 1219 1230 1220 static int wcd9380_remove(struct sdw_slave *pdev) ··· 1222 1232 struct device *dev = &pdev->dev; 1223 1233 1224 1234 component_del(dev, &wcd_sdw_component_ops); 1225 - 1226 - pm_runtime_disable(dev); 1227 - pm_runtime_set_suspended(dev); 1228 - pm_runtime_dont_use_autosuspend(dev); 1229 1235 1230 1236 return 0; 1231 1237 }