ASoC: fsl: Constify static snd_pcm_hardware
authorKrzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Mon, 29 Apr 2024 11:48:47 +0000 (13:48 +0200)
committerMark Brown <broonie@kernel.org>
Mon, 6 May 2024 15:00:21 +0000 (00:00 +0900)
Static 'struct snd_pcm_hardware' is not modified by the driver and its
copy is passed to the core, so it can be made const for increased code
safety.

Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Link: https://lore.kernel.org/r/20240429-n-asoc-const-snd-pcm-hardware-v1-2-c6ce60989834@linaro.org
Signed-off-by: Mark Brown <broonie@kernel.org>
sound/soc/fsl/imx-pcm-rpmsg.c

index b84d1dfddba2f150e307ada95001290188ee9e5a..128728b65a3ac97b262708b55a75c4ce512369ba 100644 (file)
@@ -16,7 +16,7 @@
 #include "fsl_rpmsg.h"
 #include "imx-pcm-rpmsg.h"
 
-static struct snd_pcm_hardware imx_rpmsg_pcm_hardware = {
+static const struct snd_pcm_hardware imx_rpmsg_pcm_hardware = {
        .info = SNDRV_PCM_INFO_INTERLEAVED |
                SNDRV_PCM_INFO_BLOCK_TRANSFER |
                SNDRV_PCM_INFO_BATCH |