[lvc-project] [PATCH 3/3] ASoC: dapm: make snd_soc_dapm_update_dai() *void*

Sergey Shtylyov s.shtylyov at omp.ru
Tue Apr 15 22:06:45 MSK 2025


snd_soc_dapm_update_dai() always returns 0 and its callers ignore its
result anyway. Make snd_soc_dapm_update_dai() *void* instead of *int*.

Signed-off-by: Sergey Shtylyov <s.shtylyov at omp.ru>
---
 include/sound/soc-dapm.h | 4 ++--
 sound/soc/soc-dapm.c     | 8 +++-----
 2 files changed, 5 insertions(+), 7 deletions(-)

diff --git a/include/sound/soc-dapm.h b/include/sound/soc-dapm.h
index af802ef536e7..db81fd633a7b 100644
--- a/include/sound/soc-dapm.h
+++ b/include/sound/soc-dapm.h
@@ -456,8 +456,8 @@ void snd_soc_dapm_free_widget(struct snd_soc_dapm_widget *w);
 int snd_soc_dapm_link_dai_widgets(struct snd_soc_card *card);
 void snd_soc_dapm_connect_dai_link_widgets(struct snd_soc_card *card);
 
-int snd_soc_dapm_update_dai(struct snd_pcm_substream *substream,
-			    struct snd_pcm_hw_params *params, struct snd_soc_dai *dai);
+void snd_soc_dapm_update_dai(struct snd_pcm_substream *substream,
+			     struct snd_pcm_hw_params *params, struct snd_soc_dai *dai);
 int snd_soc_dapm_widget_name_cmp(struct snd_soc_dapm_widget *widget, const char *s);
 
 /* dapm path setup */
diff --git a/sound/soc/soc-dapm.c b/sound/soc/soc-dapm.c
index fe5d484d3a43..6a7dde6d284b 100644
--- a/sound/soc/soc-dapm.c
+++ b/sound/soc/soc-dapm.c
@@ -2757,17 +2757,15 @@ static void dapm_update_dai_unlocked(struct snd_pcm_substream *substream,
 		dapm_update_dai_chan(p, p->source, channels);
 }
 
-int snd_soc_dapm_update_dai(struct snd_pcm_substream *substream,
-			    struct snd_pcm_hw_params *params,
-			    struct snd_soc_dai *dai)
+void snd_soc_dapm_update_dai(struct snd_pcm_substream *substream,
+			     struct snd_pcm_hw_params *params,
+			     struct snd_soc_dai *dai)
 {
 	struct snd_soc_pcm_runtime *rtd = snd_soc_substream_to_rtd(substream);
 
 	snd_soc_dapm_mutex_lock(rtd->card);
 	dapm_update_dai_unlocked(substream, params, dai);
 	snd_soc_dapm_mutex_unlock(rtd->card);
-
-	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