diff options
author | Takashi Iwai <tiwai@suse.de> | 2020-01-05 17:47:20 +0300 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2020-01-05 18:14:29 +0300 |
commit | d03af9b8ea7e8655869834f2eed1f1d583cc5672 (patch) | |
tree | 7b08bef1dad6ff467d4a9241b2c0cf4fb5ee9e43 /sound/core/pcm_misc.c | |
parent | d64e7f7c9e70c587ce9fcc2eacd0cd7c29bcf91c (diff) | |
download | linux-d03af9b8ea7e8655869834f2eed1f1d583cc5672.tar.xz |
ALSA: pcm: More constifications
Apply const prefix to more possible places: the string tables for PCM
format and co, the table for the PCM type helpers, etc.
Just for minor optimization and no functional changes.
Link: https://lore.kernel.org/r/20200105144823.29547-6-tiwai@suse.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/core/pcm_misc.c')
-rw-r--r-- | sound/core/pcm_misc.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/sound/core/pcm_misc.c b/sound/core/pcm_misc.c index c4eb561d2008..a6a541511534 100644 --- a/sound/core/pcm_misc.c +++ b/sound/core/pcm_misc.c @@ -42,7 +42,7 @@ struct pcm_format_data { /* we do lots of calculations on snd_pcm_format_t; shut up sparse */ #define INT __force int -static struct pcm_format_data pcm_formats[(INT)SNDRV_PCM_FORMAT_LAST+1] = { +static const struct pcm_format_data pcm_formats[(INT)SNDRV_PCM_FORMAT_LAST+1] = { [SNDRV_PCM_FORMAT_S8] = { .width = 8, .phys = 8, .le = -1, .signd = 1, .silence = {}, @@ -415,7 +415,8 @@ EXPORT_SYMBOL(snd_pcm_format_silence_64); int snd_pcm_format_set_silence(snd_pcm_format_t format, void *data, unsigned int samples) { int width; - unsigned char *dst, *pat; + unsigned char *dst; + const unsigned char *pat; if ((INT)format < 0 || (INT)format > (INT)SNDRV_PCM_FORMAT_LAST) return -EINVAL; |