Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

ASoC: Constify snd_soc_dai_ops variables

The snd_soc_dai_ops variables are not modified after initialization in
these drivers, so make them const.

Signed-off-by: Axel Lin <axel.lin@ingics.com>
Signed-off-by: Mark Brown <broonie@kernel.org>

authored by

Axel Lin and committed by
Mark Brown
64793047 d770e558

+22 -22
+1 -1
sound/soc/codecs/cs42l52.c
··· 919 919 SNDRV_PCM_FMTBIT_S20_3LE | SNDRV_PCM_FMTBIT_U20_3LE | \ 920 920 SNDRV_PCM_FMTBIT_S24_LE | SNDRV_PCM_FMTBIT_U24_LE) 921 921 922 - static struct snd_soc_dai_ops cs42l52_ops = { 922 + static const struct snd_soc_dai_ops cs42l52_ops = { 923 923 .hw_params = cs42l52_pcm_hw_params, 924 924 .digital_mute = cs42l52_digital_mute, 925 925 .set_fmt = cs42l52_set_fmt,
+1 -1
sound/soc/codecs/cs42l56.c
··· 989 989 SNDRV_PCM_FMTBIT_S32_LE) 990 990 991 991 992 - static struct snd_soc_dai_ops cs42l56_ops = { 992 + static const struct snd_soc_dai_ops cs42l56_ops = { 993 993 .hw_params = cs42l56_pcm_hw_params, 994 994 .digital_mute = cs42l56_digital_mute, 995 995 .set_fmt = cs42l56_set_dai_fmt,
+4 -4
sound/soc/codecs/isabelle.c
··· 1016 1016 #define ISABELLE_FORMATS (SNDRV_PCM_FMTBIT_S20_3LE |\ 1017 1017 SNDRV_PCM_FMTBIT_S32_LE) 1018 1018 1019 - static struct snd_soc_dai_ops isabelle_hs_dai_ops = { 1019 + static const struct snd_soc_dai_ops isabelle_hs_dai_ops = { 1020 1020 .hw_params = isabelle_hw_params, 1021 1021 .set_fmt = isabelle_set_dai_fmt, 1022 1022 .digital_mute = isabelle_hs_mute, 1023 1023 }; 1024 1024 1025 - static struct snd_soc_dai_ops isabelle_hf_dai_ops = { 1025 + static const struct snd_soc_dai_ops isabelle_hf_dai_ops = { 1026 1026 .hw_params = isabelle_hw_params, 1027 1027 .set_fmt = isabelle_set_dai_fmt, 1028 1028 .digital_mute = isabelle_hf_mute, 1029 1029 }; 1030 1030 1031 - static struct snd_soc_dai_ops isabelle_line_dai_ops = { 1031 + static const struct snd_soc_dai_ops isabelle_line_dai_ops = { 1032 1032 .hw_params = isabelle_hw_params, 1033 1033 .set_fmt = isabelle_set_dai_fmt, 1034 1034 .digital_mute = isabelle_line_mute, 1035 1035 }; 1036 1036 1037 - static struct snd_soc_dai_ops isabelle_ul_dai_ops = { 1037 + static const struct snd_soc_dai_ops isabelle_ul_dai_ops = { 1038 1038 .hw_params = isabelle_hw_params, 1039 1039 .set_fmt = isabelle_set_dai_fmt, 1040 1040 };
+5 -5
sound/soc/codecs/lm49453.c
··· 1291 1291 #define LM49453_FORMATS (SNDRV_PCM_FMTBIT_S16_LE | SNDRV_PCM_FMTBIT_S20_3LE |\ 1292 1292 SNDRV_PCM_FMTBIT_S24_LE | SNDRV_PCM_FMTBIT_S32_LE) 1293 1293 1294 - static struct snd_soc_dai_ops lm49453_headset_dai_ops = { 1294 + static const struct snd_soc_dai_ops lm49453_headset_dai_ops = { 1295 1295 .hw_params = lm49453_hw_params, 1296 1296 .set_sysclk = lm49453_set_dai_sysclk, 1297 1297 .set_fmt = lm49453_set_dai_fmt, 1298 1298 .digital_mute = lm49453_hp_mute, 1299 1299 }; 1300 1300 1301 - static struct snd_soc_dai_ops lm49453_speaker_dai_ops = { 1301 + static const struct snd_soc_dai_ops lm49453_speaker_dai_ops = { 1302 1302 .hw_params = lm49453_hw_params, 1303 1303 .set_sysclk = lm49453_set_dai_sysclk, 1304 1304 .set_fmt = lm49453_set_dai_fmt, 1305 1305 .digital_mute = lm49453_ls_mute, 1306 1306 }; 1307 1307 1308 - static struct snd_soc_dai_ops lm49453_haptic_dai_ops = { 1308 + static const struct snd_soc_dai_ops lm49453_haptic_dai_ops = { 1309 1309 .hw_params = lm49453_hw_params, 1310 1310 .set_sysclk = lm49453_set_dai_sysclk, 1311 1311 .set_fmt = lm49453_set_dai_fmt, 1312 1312 .digital_mute = lm49453_ha_mute, 1313 1313 }; 1314 1314 1315 - static struct snd_soc_dai_ops lm49453_ep_dai_ops = { 1315 + static const struct snd_soc_dai_ops lm49453_ep_dai_ops = { 1316 1316 .hw_params = lm49453_hw_params, 1317 1317 .set_sysclk = lm49453_set_dai_sysclk, 1318 1318 .set_fmt = lm49453_set_dai_fmt, 1319 1319 .digital_mute = lm49453_ep_mute, 1320 1320 }; 1321 1321 1322 - static struct snd_soc_dai_ops lm49453_lineout_dai_ops = { 1322 + static const struct snd_soc_dai_ops lm49453_lineout_dai_ops = { 1323 1323 .hw_params = lm49453_hw_params, 1324 1324 .set_sysclk = lm49453_set_dai_sysclk, 1325 1325 .set_fmt = lm49453_set_dai_fmt,
+1 -1
sound/soc/codecs/max98090.c
··· 2383 2383 #define MAX98090_RATES SNDRV_PCM_RATE_8000_96000 2384 2384 #define MAX98090_FORMATS (SNDRV_PCM_FMTBIT_S16_LE | SNDRV_PCM_FMTBIT_S24_LE) 2385 2385 2386 - static struct snd_soc_dai_ops max98090_dai_ops = { 2386 + static const struct snd_soc_dai_ops max98090_dai_ops = { 2387 2387 .set_sysclk = max98090_dai_set_sysclk, 2388 2388 .set_fmt = max98090_dai_set_fmt, 2389 2389 .set_tdm_slot = max98090_set_tdm_slot,
+1 -1
sound/soc/codecs/max98357a.c
··· 79 79 .num_dapm_routes = ARRAY_SIZE(max98357a_dapm_routes), 80 80 }; 81 81 82 - static struct snd_soc_dai_ops max98357a_dai_ops = { 82 + static const struct snd_soc_dai_ops max98357a_dai_ops = { 83 83 .trigger = max98357a_daiops_trigger, 84 84 }; 85 85
+3 -3
sound/soc/codecs/mc13783.c
··· 650 650 #define MC13783_FORMATS (SNDRV_PCM_FMTBIT_S16_LE | SNDRV_PCM_FMTBIT_S20_3LE |\ 651 651 SNDRV_PCM_FMTBIT_S24_LE) 652 652 653 - static struct snd_soc_dai_ops mc13783_ops_dac = { 653 + static const struct snd_soc_dai_ops mc13783_ops_dac = { 654 654 .hw_params = mc13783_pcm_hw_params_dac, 655 655 .set_fmt = mc13783_set_fmt_async, 656 656 .set_sysclk = mc13783_set_sysclk_dac, 657 657 .set_tdm_slot = mc13783_set_tdm_slot_dac, 658 658 }; 659 659 660 - static struct snd_soc_dai_ops mc13783_ops_codec = { 660 + static const struct snd_soc_dai_ops mc13783_ops_codec = { 661 661 .hw_params = mc13783_pcm_hw_params_codec, 662 662 .set_fmt = mc13783_set_fmt_async, 663 663 .set_sysclk = mc13783_set_sysclk_codec, ··· 698 698 }, 699 699 }; 700 700 701 - static struct snd_soc_dai_ops mc13783_ops_sync = { 701 + static const struct snd_soc_dai_ops mc13783_ops_sync = { 702 702 .hw_params = mc13783_pcm_hw_params_sync, 703 703 .set_fmt = mc13783_set_fmt_sync, 704 704 .set_sysclk = mc13783_set_sysclk_sync,
+1 -1
sound/soc/codecs/rt5645.c
··· 3110 3110 #define RT5645_FORMATS (SNDRV_PCM_FMTBIT_S16_LE | SNDRV_PCM_FMTBIT_S20_3LE | \ 3111 3111 SNDRV_PCM_FMTBIT_S24_LE | SNDRV_PCM_FMTBIT_S8) 3112 3112 3113 - static struct snd_soc_dai_ops rt5645_aif_dai_ops = { 3113 + static const struct snd_soc_dai_ops rt5645_aif_dai_ops = { 3114 3114 .hw_params = rt5645_hw_params, 3115 3115 .set_fmt = rt5645_set_dai_fmt, 3116 3116 .set_sysclk = rt5645_set_dai_sysclk,
+1 -1
sound/soc/codecs/rt5670.c
··· 2720 2720 #define RT5670_FORMATS (SNDRV_PCM_FMTBIT_S16_LE | SNDRV_PCM_FMTBIT_S20_3LE | \ 2721 2721 SNDRV_PCM_FMTBIT_S24_LE | SNDRV_PCM_FMTBIT_S8) 2722 2722 2723 - static struct snd_soc_dai_ops rt5670_aif_dai_ops = { 2723 + static const struct snd_soc_dai_ops rt5670_aif_dai_ops = { 2724 2724 .hw_params = rt5670_hw_params, 2725 2725 .set_fmt = rt5670_set_dai_fmt, 2726 2726 .set_sysclk = rt5670_set_dai_sysclk,
+1 -1
sound/soc/codecs/rt5677.c
··· 4863 4863 #define RT5677_FORMATS (SNDRV_PCM_FMTBIT_S16_LE | SNDRV_PCM_FMTBIT_S20_3LE | \ 4864 4864 SNDRV_PCM_FMTBIT_S24_LE | SNDRV_PCM_FMTBIT_S8) 4865 4865 4866 - static struct snd_soc_dai_ops rt5677_aif_dai_ops = { 4866 + static const struct snd_soc_dai_ops rt5677_aif_dai_ops = { 4867 4867 .hw_params = rt5677_hw_params, 4868 4868 .set_fmt = rt5677_set_dai_fmt, 4869 4869 .set_sysclk = rt5677_set_dai_sysclk,
+1 -1
sound/soc/codecs/si476x.c
··· 208 208 return err; 209 209 } 210 210 211 - static struct snd_soc_dai_ops si476x_dai_ops = { 211 + static const struct snd_soc_dai_ops si476x_dai_ops = { 212 212 .hw_params = si476x_codec_hw_params, 213 213 .set_fmt = si476x_codec_set_dai_fmt, 214 214 };
+1 -1
sound/soc/codecs/tas2552.c
··· 520 520 NULL) 521 521 }; 522 522 523 - static struct snd_soc_dai_ops tas2552_speaker_dai_ops = { 523 + static const struct snd_soc_dai_ops tas2552_speaker_dai_ops = { 524 524 .hw_params = tas2552_hw_params, 525 525 .prepare = tas2552_prepare, 526 526 .set_sysclk = tas2552_set_dai_sysclk,
+1 -1
sound/soc/codecs/tlv320aic31xx.c
··· 1121 1121 .num_dapm_routes = ARRAY_SIZE(aic31xx_audio_map), 1122 1122 }; 1123 1123 1124 - static struct snd_soc_dai_ops aic31xx_dai_ops = { 1124 + static const struct snd_soc_dai_ops aic31xx_dai_ops = { 1125 1125 .hw_params = aic31xx_hw_params, 1126 1126 .set_sysclk = aic31xx_set_dai_sysclk, 1127 1127 .set_fmt = aic31xx_set_dai_fmt,