[lvc-project] [PATCH 2/3] ASoC: dapm: make dapm_update_dai_unlocked() *void*
Sergey Shtylyov
s.shtylyov at omp.ru
Tue Apr 15 22:06:44 MSK 2025
dapm_update_dai_unlocked() always returns 0, so we don't have to propagate
its result from snd_soc_dapm_update_dai(). Just return 0 from that function
and make dapm_update_dai_unlocked() *void* instead of *int*.
Signed-off-by: Sergey Shtylyov <s.shtylyov at omp.ru>
---
sound/soc/soc-dapm.c | 15 ++++++---------
1 file changed, 6 insertions(+), 9 deletions(-)
diff --git a/sound/soc/soc-dapm.c b/sound/soc/soc-dapm.c
index 2df199f6af74..fe5d484d3a43 100644
--- a/sound/soc/soc-dapm.c
+++ b/sound/soc/soc-dapm.c
@@ -2734,9 +2734,9 @@ static void dapm_update_dai_chan(struct snd_soc_dapm_path *p,
soc_dapm_connect_path(p, false, "dai update");
}
-static int dapm_update_dai_unlocked(struct snd_pcm_substream *substream,
- struct snd_pcm_hw_params *params,
- struct snd_soc_dai *dai)
+static void dapm_update_dai_unlocked(struct snd_pcm_substream *substream,
+ struct snd_pcm_hw_params *params,
+ struct snd_soc_dai *dai)
{
int dir = substream->stream;
int channels = params_channels(params);
@@ -2746,7 +2746,7 @@ static int dapm_update_dai_unlocked(struct snd_pcm_substream *substream,
w = snd_soc_dai_get_widget(dai, dir);
if (!w)
- return 0;
+ return;
dev_dbg(dai->dev, "Update DAI routes for %s %s\n", dai->name, snd_pcm_direction_name(dir));
@@ -2755,8 +2755,6 @@ static int dapm_update_dai_unlocked(struct snd_pcm_substream *substream,
snd_soc_dapm_widget_for_each_source_path(w, p)
dapm_update_dai_chan(p, p->source, channels);
-
- return 0;
}
int snd_soc_dapm_update_dai(struct snd_pcm_substream *substream,
@@ -2764,13 +2762,12 @@ int snd_soc_dapm_update_dai(struct snd_pcm_substream *substream,
struct snd_soc_dai *dai)
{
struct snd_soc_pcm_runtime *rtd = snd_soc_substream_to_rtd(substream);
- int ret;
snd_soc_dapm_mutex_lock(rtd->card);
- ret = dapm_update_dai_unlocked(substream, params, dai);
+ dapm_update_dai_unlocked(substream, params, dai);
snd_soc_dapm_mutex_unlock(rtd->card);
- return ret;
+ return 0;
}
int snd_soc_dapm_widget_name_cmp(struct snd_soc_dapm_widget *widget, const char *s)
--
2.49.0
More information about the lvc-project
mailing list