ASoC: uniphier: Constify static snd_pcm_hardware
authorKrzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Mon, 29 Apr 2024 11:48:49 +0000 (13:48 +0200)
committerMark Brown <broonie@kernel.org>
Mon, 6 May 2024 15:00:22 +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-4-c6ce60989834@linaro.org
Signed-off-by: Mark Brown <broonie@kernel.org>
sound/soc/uniphier/aio-dma.c

index fe272befd9676730ab246ce2254211a8e5891995..265d61723e99a77f2cdfa3a911eca16ce4c77c3f 100644 (file)
@@ -14,7 +14,7 @@
 
 #include "aio.h"
 
-static struct snd_pcm_hardware uniphier_aiodma_hw = {
+static const struct snd_pcm_hardware uniphier_aiodma_hw = {
        .info = SNDRV_PCM_INFO_MMAP |
                SNDRV_PCM_INFO_MMAP_VALID |
                SNDRV_PCM_INFO_INTERLEAVED,