diff options
| author | Charles Keepax <ckeepax@opensource.cirrus.com> | 2026-06-08 13:27:12 +0300 |
|---|---|---|
| committer | Mark Brown <broonie@kernel.org> | 2026-06-11 22:46:53 +0300 |
| commit | 4e006504ac95493e9f93f2023704456822eea7ca (patch) | |
| tree | 948766d21ad28fdc60cfd398cd4f56c8c27e6ad2 | |
| parent | d6fc2c7051a6a844750af94a755882992e67471a (diff) | |
| download | linux-4e006504ac95493e9f93f2023704456822eea7ca.tar.xz | |
ASoC: wcd939x: Use new SoundWire enumeration helper
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.
Reviewed-by: Srinivas Kandagatla <srinivas.kandagatla@oss.qualcomm.com>
Tested-by: Srinivas Kandagatla <srinivas.kandagatla@oss.qualcomm.com>
Signed-off-by: Charles Keepax <ckeepax@opensource.cirrus.com>
Link: https://patch.msgid.link/20260608102714.2503120-9-ckeepax@opensource.cirrus.com
Signed-off-by: Mark Brown <broonie@kernel.org>
| -rw-r--r-- | sound/soc/codecs/wcd939x.c | 11 |
1 files changed, 3 insertions, 8 deletions
diff --git a/sound/soc/codecs/wcd939x.c b/sound/soc/codecs/wcd939x.c index 01f1a08f48e6..010d12466722 100644 --- a/sound/soc/codecs/wcd939x.c +++ b/sound/soc/codecs/wcd939x.c @@ -2968,17 +2968,12 @@ static int wcd939x_irq_init(struct wcd939x_priv *wcd, struct device *dev) static int wcd939x_soc_codec_probe(struct snd_soc_component *component) { struct wcd939x_priv *wcd939x = snd_soc_component_get_drvdata(component); - struct sdw_slave *tx_sdw_dev = wcd939x->tx_sdw_dev; struct device *dev = component->dev; - unsigned long time_left; int ret, i; - time_left = wait_for_completion_timeout(&tx_sdw_dev->initialization_complete, - msecs_to_jiffies(2000)); - if (!time_left) { - dev_err(dev, "soundwire device init timeout\n"); - return -ETIMEDOUT; - } + ret = sdw_slave_wait_for_init(wcd939x->tx_sdw_dev, 2000); + if (ret) + return ret; snd_soc_component_init_regmap(component, wcd939x->regmap); |
