summaryrefslogtreecommitdiff
path: root/sound/soc/soc-utils.c
diff options
context:
space:
mode:
authorMark Brown <broonie@kernel.org>2024-06-23 13:13:00 +0100
committerMark Brown <broonie@kernel.org>2024-06-23 13:13:00 +0100
commit86a37eb60ba1f17cae8ac006d0de1a6091e5ba31 (patch)
treee00f09eac24fbfdfffa196c10f760fbc4ba68e7e /sound/soc/soc-utils.c
parentd6bb39fe4fa077883a409f6eaca569ce61a28a94 (diff)
parentde267e7a6ea8e6fa29af2287adfc9fc9d87e6dc9 (diff)
ASoC: Few constifications (mostly arguments)
Merge series from Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>: Make few pointers in ASoC functions as pointers to const, so the code is clearer to read, a bit safer and allows further constifications (e.g. placing some data as rodata).
Diffstat (limited to 'sound/soc/soc-utils.c')
-rw-r--r--sound/soc/soc-utils.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/sound/soc/soc-utils.c b/sound/soc/soc-utils.c
index 20135a8359bf..11ba89c6b83c 100644
--- a/sound/soc/soc-utils.c
+++ b/sound/soc/soc-utils.c
@@ -21,7 +21,7 @@ int snd_soc_calc_frame_size(int sample_size, int channels, int tdm_slots)
}
EXPORT_SYMBOL_GPL(snd_soc_calc_frame_size);
-int snd_soc_params_to_frame_size(struct snd_pcm_hw_params *params)
+int snd_soc_params_to_frame_size(const struct snd_pcm_hw_params *params)
{
int sample_size;
@@ -40,7 +40,7 @@ int snd_soc_calc_bclk(int fs, int sample_size, int channels, int tdm_slots)
}
EXPORT_SYMBOL_GPL(snd_soc_calc_bclk);
-int snd_soc_params_to_bclk(struct snd_pcm_hw_params *params)
+int snd_soc_params_to_bclk(const struct snd_pcm_hw_params *params)
{
int ret;
@@ -79,7 +79,7 @@ EXPORT_SYMBOL_GPL(snd_soc_params_to_bclk);
* Return: bclk frequency in Hz, else a negative error code if params format
* is invalid.
*/
-int snd_soc_tdm_params_to_bclk(struct snd_pcm_hw_params *params,
+int snd_soc_tdm_params_to_bclk(const struct snd_pcm_hw_params *params,
int tdm_width, int tdm_slots, int slot_multiple)
{
if (!tdm_slots)
@@ -211,7 +211,7 @@ static struct snd_soc_dai_driver dummy_dai = {
.ops = &dummy_dai_ops,
};
-int snd_soc_dai_is_dummy(struct snd_soc_dai *dai)
+int snd_soc_dai_is_dummy(const struct snd_soc_dai *dai)
{
if (dai->driver == &dummy_dai)
return 1;