]> www.infradead.org Git - users/jedix/linux-maple.git/commit
ASoC: Constify passed data to core function
authorKrzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Mon, 17 Jun 2024 13:03:21 +0000 (15:03 +0200)
committerMark Brown <broonie@kernel.org>
Tue, 18 Jun 2024 13:19:54 +0000 (14:19 +0100)
commitf3ac3da7e4d0957b3402fb31a4ca480e739e086f
tree57799620555b0db392ab2a4ec77bbc19fb9691db
parent020b37d06f97de289940805bc821190d5858eda0
ASoC: Constify passed data to core function

Several ASoC functions receive pointers to data which is not modified,
e.g. pointers to 'snd_soc_dai', 'snd_soc_pcm_runtime',
'snd_pcm_hw_params' and 'snd_soc_dai_link'.

All these pointers can be made as a pointer to const.  This makes code
safer, serves as clear annotation of function's intentions (no ownership
passed to the function, no modifications) and allows putting pointed
structures in rodata (if ever applicable).

Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Link: https://msgid.link/r/20240617-n-asoc-const-auto-selectable-formats-v1-3-8004f346ee38@linaro.org
Signed-off-by: Mark Brown <broonie@kernel.org>
include/sound/soc-dai.h
include/sound/soc.h
sound/soc/soc-core.c
sound/soc/soc-dai.c
sound/soc/soc-utils.c