]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
ASoC: makes snd_soc_set_runtime_hwparams() inline
authorKuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Wed, 16 Oct 2024 01:35:27 +0000 (01:35 +0000)
committerMark Brown <broonie@kernel.org>
Thu, 17 Oct 2024 11:13:08 +0000 (12:13 +0100)
snd_soc_set_runtime_hwparams() is now doing very simple things.
We can makes it simply inline function, without having EXPORT_SYMBOL_GPL()

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Link: https://patch.msgid.link/87cyk0eso0.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>
include/sound/soc.h
sound/soc/soc-pcm.c

index e6e359c1a2ac4da34bce506e081b28b74ad71f8c..8a1db45988ba61b0034895f7b13b05afc51dd3de 100644 (file)
@@ -541,8 +541,13 @@ int snd_soc_tdm_params_to_bclk(const struct snd_pcm_hw_params *params,
                               int tdm_width, int tdm_slots, int slot_multiple);
 
 /* set runtime hw params */
-int snd_soc_set_runtime_hwparams(struct snd_pcm_substream *substream,
-       const struct snd_pcm_hardware *hw);
+static inline int snd_soc_set_runtime_hwparams(struct snd_pcm_substream *substream,
+                                              const struct snd_pcm_hardware *hw)
+{
+       substream->runtime->hw = *hw;
+
+       return 0;
+}
 
 struct snd_ac97 *snd_soc_alloc_ac97_component(struct snd_soc_component *component);
 struct snd_ac97 *snd_soc_new_ac97_component(struct snd_soc_component *component,
index 7a59121fc323c3a850297be74ecf7f6406860d9f..e2c5300df0f2524b63954dc58320f65f83955ae0 100644 (file)
@@ -416,22 +416,6 @@ bool snd_soc_runtime_ignore_pmdown_time(struct snd_soc_pcm_runtime *rtd)
        return true;
 }
 
-/**
- * snd_soc_set_runtime_hwparams - set the runtime hardware parameters
- * @substream: the pcm substream
- * @hw: the hardware parameters
- *
- * Sets the substream runtime hardware parameters.
- */
-int snd_soc_set_runtime_hwparams(struct snd_pcm_substream *substream,
-       const struct snd_pcm_hardware *hw)
-{
-       substream->runtime->hw = *hw;
-
-       return 0;
-}
-EXPORT_SYMBOL_GPL(snd_soc_set_runtime_hwparams);
-
 /* DPCM stream event, send event to FE and all active BEs. */
 int dpcm_dapm_stream_event(struct snd_soc_pcm_runtime *fe, int dir,
        int event)