Skip to content

Commit d5cda96

Browse files
Srinivas Kandagatlabroonie
authored andcommitted
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: ebaf88c ("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>
1 parent 57b00ab commit d5cda96

File tree

1 file changed

+3
-17
lines changed

1 file changed

+3
-17
lines changed

sound/soc/codecs/wcd938x-sdw.c

Lines changed: 3 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1207,24 +1207,14 @@ static int wcd9380_probe(struct sdw_slave *pdev,
12071207
regcache_cache_only(wcd->regmap, true);
12081208
}
12091209

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-
12161210
ret = component_add(dev, &wcd_sdw_component_ops);
12171211
if (ret)
1218-
goto err_disable_rpm;
1219-
1220-
return 0;
1212+
return ret;
12211213

1222-
err_disable_rpm:
1223-
pm_runtime_disable(dev);
1214+
/* Set suspended until aggregate device is bind */
12241215
pm_runtime_set_suspended(dev);
1225-
pm_runtime_dont_use_autosuspend(dev);
12261216

1227-
return ret;
1217+
return 0;
12281218
}
12291219

12301220
static int wcd9380_remove(struct sdw_slave *pdev)
@@ -1233,10 +1223,6 @@ static int wcd9380_remove(struct sdw_slave *pdev)
12331223

12341224
component_del(dev, &wcd_sdw_component_ops);
12351225

1236-
pm_runtime_disable(dev);
1237-
pm_runtime_set_suspended(dev);
1238-
pm_runtime_dont_use_autosuspend(dev);
1239-
12401226
return 0;
12411227
}
12421228

0 commit comments

Comments
 (0)