[PATCH 05/10] ASoC: pm4125: Use new SoundWire enumeration helper
From: Charles Keepax
Date: Wed Jun 03 2026 - 11:21:18 EST
Now the new wait for SoundWire enumeration helper no longer depends on
unattach_request it is safe to use from probe time. Update the driver
to use the new core helper.
Signed-off-by: Charles Keepax <ckeepax@xxxxxxxxxxxxxxxxxxxxx>
---
sound/soc/codecs/pm4125.c | 11 +++--------
1 file changed, 3 insertions(+), 8 deletions(-)
diff --git a/sound/soc/codecs/pm4125.c b/sound/soc/codecs/pm4125.c
index 1f0a3f5389f1b..29655175ea289 100644
--- a/sound/soc/codecs/pm4125.c
+++ b/sound/soc/codecs/pm4125.c
@@ -1309,17 +1309,12 @@ static int pm4125_irq_init(struct pm4125_priv *pm4125, struct device *dev)
static int pm4125_soc_codec_probe(struct snd_soc_component *component)
{
struct pm4125_priv *pm4125 = snd_soc_component_get_drvdata(component);
- struct sdw_slave *tx_sdw_dev = pm4125->tx_sdw_dev;
struct device *dev = component->dev;
- unsigned long time_left;
int i, ret;
- time_left = wait_for_completion_timeout(&tx_sdw_dev->initialization_complete,
- msecs_to_jiffies(5000));
- if (!time_left) {
- dev_err(dev, "soundwire device init timeout\n");
- return -ETIMEDOUT;
- }
+ ret = sdw_slave_wait_for_init(pm4125->tx_sdw_dev, 5000);
+ if (ret)
+ return ret;
snd_soc_component_init_regmap(component, pm4125->regmap);
ret = pm_runtime_resume_and_get(dev);
--
2.47.3