aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAxel Lin <axel.lin@ingics.com>2015-07-15 03:38:14 -0400
committerMark Brown <broonie@kernel.org>2015-07-15 07:12:46 -0400
commit64793047558781330a1d13b159a2bc9385bdf97f (patch)
tree2f574a0b89a19922961e7827fb4d85dbda75e31c
parentd770e558e21961ad6cfdf0ff7df0eb5d7d4f0754 (diff)
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>
-rw-r--r--sound/soc/codecs/cs42l52.c2
-rw-r--r--sound/soc/codecs/cs42l56.c2
-rw-r--r--sound/soc/codecs/isabelle.c8
-rw-r--r--sound/soc/codecs/lm49453.c10
-rw-r--r--sound/soc/codecs/max98090.c2
-rw-r--r--sound/soc/codecs/max98357a.c2
-rw-r--r--sound/soc/codecs/mc13783.c6
-rw-r--r--sound/soc/codecs/rt5645.c2
-rw-r--r--sound/soc/codecs/rt5670.c2
-rw-r--r--sound/soc/codecs/rt5677.c2
-rw-r--r--sound/soc/codecs/si476x.c2
-rw-r--r--sound/soc/codecs/tas2552.c2
-rw-r--r--sound/soc/codecs/tlv320aic31xx.c2
13 files changed, 22 insertions, 22 deletions
diff --git a/sound/soc/codecs/cs42l52.c b/sound/soc/codecs/cs42l52.c
index 4de52c9957ac..c8f4af230ac0 100644
--- a/sound/soc/codecs/cs42l52.c
+++ b/sound/soc/codecs/cs42l52.c
@@ -919,7 +919,7 @@ static int cs42l52_set_bias_level(struct snd_soc_codec *codec,
919 SNDRV_PCM_FMTBIT_S20_3LE | SNDRV_PCM_FMTBIT_U20_3LE | \ 919 SNDRV_PCM_FMTBIT_S20_3LE | SNDRV_PCM_FMTBIT_U20_3LE | \
920 SNDRV_PCM_FMTBIT_S24_LE | SNDRV_PCM_FMTBIT_U24_LE) 920 SNDRV_PCM_FMTBIT_S24_LE | SNDRV_PCM_FMTBIT_U24_LE)
921 921
922static struct snd_soc_dai_ops cs42l52_ops = { 922static const struct snd_soc_dai_ops cs42l52_ops = {
923 .hw_params = cs42l52_pcm_hw_params, 923 .hw_params = cs42l52_pcm_hw_params,
924 .digital_mute = cs42l52_digital_mute, 924 .digital_mute = cs42l52_digital_mute,
925 .set_fmt = cs42l52_set_fmt, 925 .set_fmt = cs42l52_set_fmt,
diff --git a/sound/soc/codecs/cs42l56.c b/sound/soc/codecs/cs42l56.c
index 1e11ba45a79f..22bc2f3460a5 100644
--- a/sound/soc/codecs/cs42l56.c
+++ b/sound/soc/codecs/cs42l56.c
@@ -989,7 +989,7 @@ static int cs42l56_set_bias_level(struct snd_soc_codec *codec,
989 SNDRV_PCM_FMTBIT_S32_LE) 989 SNDRV_PCM_FMTBIT_S32_LE)
990 990
991 991
992static struct snd_soc_dai_ops cs42l56_ops = { 992static const struct snd_soc_dai_ops cs42l56_ops = {
993 .hw_params = cs42l56_pcm_hw_params, 993 .hw_params = cs42l56_pcm_hw_params,
994 .digital_mute = cs42l56_digital_mute, 994 .digital_mute = cs42l56_digital_mute,
995 .set_fmt = cs42l56_set_dai_fmt, 995 .set_fmt = cs42l56_set_dai_fmt,
diff --git a/sound/soc/codecs/isabelle.c b/sound/soc/codecs/isabelle.c
index ebd90283c960..00dca1fdfcff 100644
--- a/sound/soc/codecs/isabelle.c
+++ b/sound/soc/codecs/isabelle.c
@@ -1016,25 +1016,25 @@ static int isabelle_set_dai_fmt(struct snd_soc_dai *codec_dai, unsigned int fmt)
1016#define ISABELLE_FORMATS (SNDRV_PCM_FMTBIT_S20_3LE |\ 1016#define ISABELLE_FORMATS (SNDRV_PCM_FMTBIT_S20_3LE |\
1017 SNDRV_PCM_FMTBIT_S32_LE) 1017 SNDRV_PCM_FMTBIT_S32_LE)
1018 1018
1019static struct snd_soc_dai_ops isabelle_hs_dai_ops = { 1019static const struct snd_soc_dai_ops isabelle_hs_dai_ops = {
1020 .hw_params = isabelle_hw_params, 1020 .hw_params = isabelle_hw_params,
1021 .set_fmt = isabelle_set_dai_fmt, 1021 .set_fmt = isabelle_set_dai_fmt,
1022 .digital_mute = isabelle_hs_mute, 1022 .digital_mute = isabelle_hs_mute,
1023}; 1023};
1024 1024
1025static struct snd_soc_dai_ops isabelle_hf_dai_ops = { 1025static const struct snd_soc_dai_ops isabelle_hf_dai_ops = {
1026 .hw_params = isabelle_hw_params, 1026 .hw_params = isabelle_hw_params,
1027 .set_fmt = isabelle_set_dai_fmt, 1027 .set_fmt = isabelle_set_dai_fmt,
1028 .digital_mute = isabelle_hf_mute, 1028 .digital_mute = isabelle_hf_mute,
1029}; 1029};
1030 1030
1031static struct snd_soc_dai_ops isabelle_line_dai_ops = { 1031static const struct snd_soc_dai_ops isabelle_line_dai_ops = {
1032 .hw_params = isabelle_hw_params, 1032 .hw_params = isabelle_hw_params,
1033 .set_fmt = isabelle_set_dai_fmt, 1033 .set_fmt = isabelle_set_dai_fmt,
1034 .digital_mute = isabelle_line_mute, 1034 .digital_mute = isabelle_line_mute,
1035}; 1035};
1036 1036
1037static struct snd_soc_dai_ops isabelle_ul_dai_ops = { 1037static const struct snd_soc_dai_ops isabelle_ul_dai_ops = {
1038 .hw_params = isabelle_hw_params, 1038 .hw_params = isabelle_hw_params,
1039 .set_fmt = isabelle_set_dai_fmt, 1039 .set_fmt = isabelle_set_dai_fmt,
1040}; 1040};
diff --git a/sound/soc/codecs/lm49453.c b/sound/soc/codecs/lm49453.c
index 6600aa0a33dc..081d96d6df29 100644
--- a/sound/soc/codecs/lm49453.c
+++ b/sound/soc/codecs/lm49453.c
@@ -1291,35 +1291,35 @@ static int lm49453_set_bias_level(struct snd_soc_codec *codec,
1291#define LM49453_FORMATS (SNDRV_PCM_FMTBIT_S16_LE | SNDRV_PCM_FMTBIT_S20_3LE |\ 1291#define LM49453_FORMATS (SNDRV_PCM_FMTBIT_S16_LE | SNDRV_PCM_FMTBIT_S20_3LE |\
1292 SNDRV_PCM_FMTBIT_S24_LE | SNDRV_PCM_FMTBIT_S32_LE) 1292 SNDRV_PCM_FMTBIT_S24_LE | SNDRV_PCM_FMTBIT_S32_LE)
1293 1293
1294static struct snd_soc_dai_ops lm49453_headset_dai_ops = { 1294static const struct snd_soc_dai_ops lm49453_headset_dai_ops = {
1295 .hw_params = lm49453_hw_params, 1295 .hw_params = lm49453_hw_params,
1296 .set_sysclk = lm49453_set_dai_sysclk, 1296 .set_sysclk = lm49453_set_dai_sysclk,
1297 .set_fmt = lm49453_set_dai_fmt, 1297 .set_fmt = lm49453_set_dai_fmt,
1298 .digital_mute = lm49453_hp_mute, 1298 .digital_mute = lm49453_hp_mute,
1299}; 1299};
1300 1300
1301static struct snd_soc_dai_ops lm49453_speaker_dai_ops = { 1301static const struct snd_soc_dai_ops lm49453_speaker_dai_ops = {
1302 .hw_params = lm49453_hw_params, 1302 .hw_params = lm49453_hw_params,
1303 .set_sysclk = lm49453_set_dai_sysclk, 1303 .set_sysclk = lm49453_set_dai_sysclk,
1304 .set_fmt = lm49453_set_dai_fmt, 1304 .set_fmt = lm49453_set_dai_fmt,
1305 .digital_mute = lm49453_ls_mute, 1305 .digital_mute = lm49453_ls_mute,
1306}; 1306};
1307 1307
1308static struct snd_soc_dai_ops lm49453_haptic_dai_ops = { 1308static const struct snd_soc_dai_ops lm49453_haptic_dai_ops = {
1309 .hw_params = lm49453_hw_params, 1309 .hw_params = lm49453_hw_params,
1310 .set_sysclk = lm49453_set_dai_sysclk, 1310 .set_sysclk = lm49453_set_dai_sysclk,
1311 .set_fmt = lm49453_set_dai_fmt, 1311 .set_fmt = lm49453_set_dai_fmt,
1312 .digital_mute = lm49453_ha_mute, 1312 .digital_mute = lm49453_ha_mute,
1313}; 1313};
1314 1314
1315static struct snd_soc_dai_ops lm49453_ep_dai_ops = { 1315static const struct snd_soc_dai_ops lm49453_ep_dai_ops = {
1316 .hw_params = lm49453_hw_params, 1316 .hw_params = lm49453_hw_params,
1317 .set_sysclk = lm49453_set_dai_sysclk, 1317 .set_sysclk = lm49453_set_dai_sysclk,
1318 .set_fmt = lm49453_set_dai_fmt, 1318 .set_fmt = lm49453_set_dai_fmt,
1319 .digital_mute = lm49453_ep_mute, 1319 .digital_mute = lm49453_ep_mute,
1320}; 1320};
1321 1321
1322static struct snd_soc_dai_ops lm49453_lineout_dai_ops = { 1322static const struct snd_soc_dai_ops lm49453_lineout_dai_ops = {
1323 .hw_params = lm49453_hw_params, 1323 .hw_params = lm49453_hw_params,
1324 .set_sysclk = lm49453_set_dai_sysclk, 1324 .set_sysclk = lm49453_set_dai_sysclk,
1325 .set_fmt = lm49453_set_dai_fmt, 1325 .set_fmt = lm49453_set_dai_fmt,
diff --git a/sound/soc/codecs/max98090.c b/sound/soc/codecs/max98090.c
index 78268f0514e9..b1b436f05ebe 100644
--- a/sound/soc/codecs/max98090.c
+++ b/sound/soc/codecs/max98090.c
@@ -2383,7 +2383,7 @@ EXPORT_SYMBOL_GPL(max98090_mic_detect);
2383#define MAX98090_RATES SNDRV_PCM_RATE_8000_96000 2383#define MAX98090_RATES SNDRV_PCM_RATE_8000_96000
2384#define MAX98090_FORMATS (SNDRV_PCM_FMTBIT_S16_LE | SNDRV_PCM_FMTBIT_S24_LE) 2384#define MAX98090_FORMATS (SNDRV_PCM_FMTBIT_S16_LE | SNDRV_PCM_FMTBIT_S24_LE)
2385 2385
2386static struct snd_soc_dai_ops max98090_dai_ops = { 2386static const struct snd_soc_dai_ops max98090_dai_ops = {
2387 .set_sysclk = max98090_dai_set_sysclk, 2387 .set_sysclk = max98090_dai_set_sysclk,
2388 .set_fmt = max98090_dai_set_fmt, 2388 .set_fmt = max98090_dai_set_fmt,
2389 .set_tdm_slot = max98090_set_tdm_slot, 2389 .set_tdm_slot = max98090_set_tdm_slot,
diff --git a/sound/soc/codecs/max98357a.c b/sound/soc/codecs/max98357a.c
index 3a2fda08a893..c4a211d3646c 100644
--- a/sound/soc/codecs/max98357a.c
+++ b/sound/soc/codecs/max98357a.c
@@ -79,7 +79,7 @@ static struct snd_soc_codec_driver max98357a_codec_driver = {
79 .num_dapm_routes = ARRAY_SIZE(max98357a_dapm_routes), 79 .num_dapm_routes = ARRAY_SIZE(max98357a_dapm_routes),
80}; 80};
81 81
82static struct snd_soc_dai_ops max98357a_dai_ops = { 82static const struct snd_soc_dai_ops max98357a_dai_ops = {
83 .trigger = max98357a_daiops_trigger, 83 .trigger = max98357a_daiops_trigger,
84}; 84};
85 85
diff --git a/sound/soc/codecs/mc13783.c b/sound/soc/codecs/mc13783.c
index 3d44fc50e4d0..3e770cbe7f0f 100644
--- a/sound/soc/codecs/mc13783.c
+++ b/sound/soc/codecs/mc13783.c
@@ -650,14 +650,14 @@ static int mc13783_remove(struct snd_soc_codec *codec)
650#define MC13783_FORMATS (SNDRV_PCM_FMTBIT_S16_LE | SNDRV_PCM_FMTBIT_S20_3LE |\ 650#define MC13783_FORMATS (SNDRV_PCM_FMTBIT_S16_LE | SNDRV_PCM_FMTBIT_S20_3LE |\
651 SNDRV_PCM_FMTBIT_S24_LE) 651 SNDRV_PCM_FMTBIT_S24_LE)
652 652
653static struct snd_soc_dai_ops mc13783_ops_dac = { 653static const struct snd_soc_dai_ops mc13783_ops_dac = {
654 .hw_params = mc13783_pcm_hw_params_dac, 654 .hw_params = mc13783_pcm_hw_params_dac,
655 .set_fmt = mc13783_set_fmt_async, 655 .set_fmt = mc13783_set_fmt_async,
656 .set_sysclk = mc13783_set_sysclk_dac, 656 .set_sysclk = mc13783_set_sysclk_dac,
657 .set_tdm_slot = mc13783_set_tdm_slot_dac, 657 .set_tdm_slot = mc13783_set_tdm_slot_dac,
658}; 658};
659 659
660static struct snd_soc_dai_ops mc13783_ops_codec = { 660static const struct snd_soc_dai_ops mc13783_ops_codec = {
661 .hw_params = mc13783_pcm_hw_params_codec, 661 .hw_params = mc13783_pcm_hw_params_codec,
662 .set_fmt = mc13783_set_fmt_async, 662 .set_fmt = mc13783_set_fmt_async,
663 .set_sysclk = mc13783_set_sysclk_codec, 663 .set_sysclk = mc13783_set_sysclk_codec,
@@ -698,7 +698,7 @@ static struct snd_soc_dai_driver mc13783_dai_async[] = {
698 }, 698 },
699}; 699};
700 700
701static struct snd_soc_dai_ops mc13783_ops_sync = { 701static const struct snd_soc_dai_ops mc13783_ops_sync = {
702 .hw_params = mc13783_pcm_hw_params_sync, 702 .hw_params = mc13783_pcm_hw_params_sync,
703 .set_fmt = mc13783_set_fmt_sync, 703 .set_fmt = mc13783_set_fmt_sync,
704 .set_sysclk = mc13783_set_sysclk_sync, 704 .set_sysclk = mc13783_set_sysclk_sync,
diff --git a/sound/soc/codecs/rt5645.c b/sound/soc/codecs/rt5645.c
index 9ce311e088fc..7c59326dce3e 100644
--- a/sound/soc/codecs/rt5645.c
+++ b/sound/soc/codecs/rt5645.c
@@ -3110,7 +3110,7 @@ static int rt5645_resume(struct snd_soc_codec *codec)
3110#define RT5645_FORMATS (SNDRV_PCM_FMTBIT_S16_LE | SNDRV_PCM_FMTBIT_S20_3LE | \ 3110#define RT5645_FORMATS (SNDRV_PCM_FMTBIT_S16_LE | SNDRV_PCM_FMTBIT_S20_3LE | \
3111 SNDRV_PCM_FMTBIT_S24_LE | SNDRV_PCM_FMTBIT_S8) 3111 SNDRV_PCM_FMTBIT_S24_LE | SNDRV_PCM_FMTBIT_S8)
3112 3112
3113static struct snd_soc_dai_ops rt5645_aif_dai_ops = { 3113static const struct snd_soc_dai_ops rt5645_aif_dai_ops = {
3114 .hw_params = rt5645_hw_params, 3114 .hw_params = rt5645_hw_params,
3115 .set_fmt = rt5645_set_dai_fmt, 3115 .set_fmt = rt5645_set_dai_fmt,
3116 .set_sysclk = rt5645_set_dai_sysclk, 3116 .set_sysclk = rt5645_set_dai_sysclk,
diff --git a/sound/soc/codecs/rt5670.c b/sound/soc/codecs/rt5670.c
index a9123d414178..d583510ac026 100644
--- a/sound/soc/codecs/rt5670.c
+++ b/sound/soc/codecs/rt5670.c
@@ -2720,7 +2720,7 @@ static int rt5670_resume(struct snd_soc_codec *codec)
2720#define RT5670_FORMATS (SNDRV_PCM_FMTBIT_S16_LE | SNDRV_PCM_FMTBIT_S20_3LE | \ 2720#define RT5670_FORMATS (SNDRV_PCM_FMTBIT_S16_LE | SNDRV_PCM_FMTBIT_S20_3LE | \
2721 SNDRV_PCM_FMTBIT_S24_LE | SNDRV_PCM_FMTBIT_S8) 2721 SNDRV_PCM_FMTBIT_S24_LE | SNDRV_PCM_FMTBIT_S8)
2722 2722
2723static struct snd_soc_dai_ops rt5670_aif_dai_ops = { 2723static const struct snd_soc_dai_ops rt5670_aif_dai_ops = {
2724 .hw_params = rt5670_hw_params, 2724 .hw_params = rt5670_hw_params,
2725 .set_fmt = rt5670_set_dai_fmt, 2725 .set_fmt = rt5670_set_dai_fmt,
2726 .set_sysclk = rt5670_set_dai_sysclk, 2726 .set_sysclk = rt5670_set_dai_sysclk,
diff --git a/sound/soc/codecs/rt5677.c b/sound/soc/codecs/rt5677.c
index 31d969ac1192..4b584f90eb91 100644
--- a/sound/soc/codecs/rt5677.c
+++ b/sound/soc/codecs/rt5677.c
@@ -4863,7 +4863,7 @@ static int rt5677_write(void *context, unsigned int reg, unsigned int val)
4863#define RT5677_FORMATS (SNDRV_PCM_FMTBIT_S16_LE | SNDRV_PCM_FMTBIT_S20_3LE | \ 4863#define RT5677_FORMATS (SNDRV_PCM_FMTBIT_S16_LE | SNDRV_PCM_FMTBIT_S20_3LE | \
4864 SNDRV_PCM_FMTBIT_S24_LE | SNDRV_PCM_FMTBIT_S8) 4864 SNDRV_PCM_FMTBIT_S24_LE | SNDRV_PCM_FMTBIT_S8)
4865 4865
4866static struct snd_soc_dai_ops rt5677_aif_dai_ops = { 4866static const struct snd_soc_dai_ops rt5677_aif_dai_ops = {
4867 .hw_params = rt5677_hw_params, 4867 .hw_params = rt5677_hw_params,
4868 .set_fmt = rt5677_set_dai_fmt, 4868 .set_fmt = rt5677_set_dai_fmt,
4869 .set_sysclk = rt5677_set_dai_sysclk, 4869 .set_sysclk = rt5677_set_dai_sysclk,
diff --git a/sound/soc/codecs/si476x.c b/sound/soc/codecs/si476x.c
index 3e72964280c6..a8402d0af0ea 100644
--- a/sound/soc/codecs/si476x.c
+++ b/sound/soc/codecs/si476x.c
@@ -208,7 +208,7 @@ out:
208 return err; 208 return err;
209} 209}
210 210
211static struct snd_soc_dai_ops si476x_dai_ops = { 211static const struct snd_soc_dai_ops si476x_dai_ops = {
212 .hw_params = si476x_codec_hw_params, 212 .hw_params = si476x_codec_hw_params,
213 .set_fmt = si476x_codec_set_dai_fmt, 213 .set_fmt = si476x_codec_set_dai_fmt,
214}; 214};
diff --git a/sound/soc/codecs/tas2552.c b/sound/soc/codecs/tas2552.c
index 4f25a7d0efa2..d1552c308f77 100644
--- a/sound/soc/codecs/tas2552.c
+++ b/sound/soc/codecs/tas2552.c
@@ -520,7 +520,7 @@ static const struct dev_pm_ops tas2552_pm = {
520 NULL) 520 NULL)
521}; 521};
522 522
523static struct snd_soc_dai_ops tas2552_speaker_dai_ops = { 523static const struct snd_soc_dai_ops tas2552_speaker_dai_ops = {
524 .hw_params = tas2552_hw_params, 524 .hw_params = tas2552_hw_params,
525 .prepare = tas2552_prepare, 525 .prepare = tas2552_prepare,
526 .set_sysclk = tas2552_set_dai_sysclk, 526 .set_sysclk = tas2552_set_dai_sysclk,
diff --git a/sound/soc/codecs/tlv320aic31xx.c b/sound/soc/codecs/tlv320aic31xx.c
index c4c960f592a1..df01feca449f 100644
--- a/sound/soc/codecs/tlv320aic31xx.c
+++ b/sound/soc/codecs/tlv320aic31xx.c
@@ -1121,7 +1121,7 @@ static struct snd_soc_codec_driver soc_codec_driver_aic31xx = {
1121 .num_dapm_routes = ARRAY_SIZE(aic31xx_audio_map), 1121 .num_dapm_routes = ARRAY_SIZE(aic31xx_audio_map),
1122}; 1122};
1123 1123
1124static struct snd_soc_dai_ops aic31xx_dai_ops = { 1124static const struct snd_soc_dai_ops aic31xx_dai_ops = {
1125 .hw_params = aic31xx_hw_params, 1125 .hw_params = aic31xx_hw_params,
1126 .set_sysclk = aic31xx_set_dai_sysclk, 1126 .set_sysclk = aic31xx_set_dai_sysclk,
1127 .set_fmt = aic31xx_set_dai_fmt, 1127 .set_fmt = aic31xx_set_dai_fmt,