diff mbox series

[1/6] ASoC: Constify of_phandle_args in snd_soc_dai_driver

Message ID 20240617-n-asoc-const-auto-selectable-formats-v1-1-8004f346ee38@linaro.org (mailing list archive)
State Not Applicable
Headers show
Series ASoC: Few constifications (mostly arguments) | expand

Commit Message

Krzysztof Kozlowski June 17, 2024, 1:03 p.m. UTC
ASoC core code does not modify contents of 'of_phandle_args' in 'struct
snd_soc_dai_driver', so the pointer can be made as a pointer to const.
This makes code safer, serves as clear annotation of core's intentions
and allows putting pointed structures in rodata (if ever applicable).

Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
---
 include/sound/soc-dai.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff mbox series

Patch

diff --git a/include/sound/soc-dai.h b/include/sound/soc-dai.h
index 279223c4ef5e..8b2ae7b71965 100644
--- a/include/sound/soc-dai.h
+++ b/include/sound/soc-dai.h
@@ -413,7 +413,7 @@  struct snd_soc_dai_driver {
 	unsigned int id;
 	unsigned int base;
 	struct snd_soc_dobj dobj;
-	struct of_phandle_args *dai_args;
+	const struct of_phandle_args *dai_args;
 
 	/* ops */
 	const struct snd_soc_dai_ops *ops;