Message ID | 20240617092152.244981-1-krzysztof.kozlowski@linaro.org (mailing list archive) |
---|---|
State | Superseded |
Headers | show |
Series | [1/2] ASoC: soc-dai.h: Constify DAI ops auto_selectable_formats | expand |
Hi Krzysztof, On Mon, 17 Jun 2024 11:21:51 +0200 Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> wrote: > The core ASoC code does not modify contents of the > 'auto_selectable_formats' array passed in 'struct snd_soc_dai_ops', so > make it const for code safety. > > Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Reviewed-by: Herve Codina <herve.codina@bootlin.com> Best regards, Hervé
diff --git a/include/sound/soc-dai.h b/include/sound/soc-dai.h index 15ef268c9845..279223c4ef5e 100644 --- a/include/sound/soc-dai.h +++ b/include/sound/soc-dai.h @@ -361,7 +361,7 @@ struct snd_soc_dai_ops { * see * snd_soc_dai_get_fmt() */ - u64 *auto_selectable_formats; + const u64 *auto_selectable_formats; int num_auto_selectable_formats; /* probe ordering - for components with runtime dependencies */
The core ASoC code does not modify contents of the 'auto_selectable_formats' array passed in 'struct snd_soc_dai_ops', so make it const for code safety. Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> --- include/sound/soc-dai.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)