diff options
| author | Charles Keepax <ckeepax@opensource.cirrus.com> | 2026-06-08 13:27:08 +0300 |
|---|---|---|
| committer | Mark Brown <broonie@kernel.org> | 2026-06-11 22:46:50 +0300 |
| commit | 933feddee4d739748fe7d183432d10e589adfe97 (patch) | |
| tree | b2b4a87df26d62a1d88c9486e060f5b5ff1ef9df | |
| parent | f0eb67c618ee2e19a406edd24dc776eb86831870 (diff) | |
| download | linux-933feddee4d739748fe7d183432d10e589adfe97.tar.xz | |
ASoC: rt5682: 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.
Signed-off-by: Charles Keepax <ckeepax@opensource.cirrus.com>
Reviewed-by: Srinivas Kandagatla <srinivas.kandagatla@oss.qualcomm.com>
Tested-by: Srinivas Kandagatla <srinivas.kandagatla@oss.qualcomm.com>
Link: https://patch.msgid.link/20260608102714.2503120-5-ckeepax@opensource.cirrus.com
Signed-off-by: Mark Brown <broonie@kernel.org>
| -rw-r--r-- | sound/soc/codecs/rt5682.c | 14 |
1 files changed, 4 insertions, 10 deletions
diff --git a/sound/soc/codecs/rt5682.c b/sound/soc/codecs/rt5682.c index d39f8e4f3474..4b82e07d3b2c 100644 --- a/sound/soc/codecs/rt5682.c +++ b/sound/soc/codecs/rt5682.c @@ -2929,20 +2929,14 @@ static int rt5682_probe(struct snd_soc_component *component) { struct rt5682_priv *rt5682 = snd_soc_component_get_drvdata(component); struct snd_soc_dapm_context *dapm = snd_soc_component_to_dapm(component); - struct sdw_slave *slave; - unsigned long time; + int ret; rt5682->component = component; if (rt5682->is_sdw) { - slave = rt5682->slave; - time = wait_for_completion_timeout( - &slave->initialization_complete, - msecs_to_jiffies(RT5682_PROBE_TIMEOUT)); - if (!time) { - dev_err(&slave->dev, "Initialization not complete, timed out\n"); - return -ETIMEDOUT; - } + ret = sdw_slave_wait_for_init(rt5682->slave, RT5682_PROBE_TIMEOUT); + if (ret) + return ret; } snd_soc_dapm_disable_pin(dapm, "MICBIAS"); |
