diff options
author | Lars-Peter Clausen <lars@metafoo.de> | 2011-11-23 11:40:40 +0100 |
---|---|---|
committer | Mark Brown <broonie@opensource.wolfsonmicro.com> | 2011-11-23 10:40:46 +0000 |
commit | 85e7652d89293a6dab42bfd31f276f8bc072d4c5 (patch) | |
tree | 648de4f4e055ccd0c687184c3fc56e4f56bc3e16 /sound/soc/codecs | |
parent | bea0ed0825be288f9fc98696fc476066776b26be (diff) | |
download | op-kernel-dev-85e7652d89293a6dab42bfd31f276f8bc072d4c5.zip op-kernel-dev-85e7652d89293a6dab42bfd31f276f8bc072d4c5.tar.gz |
ASoC: Constify snd_soc_dai_ops structs
Commit 1ee46ebd("ASoC: Make the DAI ops constant in the DAI structure")
introduced the possibility to have constant DAI ops structures, yet this is
barley used in both existing drivers and also new drivers being submitted,
although none of them modifies its DAI ops structure. The later is not
surprising since existing drivers are often used as templates for new drivers.
So this patch just constifies all existing snd_soc_dai_ops structs to eliminate
the issue altogether.
The patch was generated with the following coccinelle semantic patch:
// <smpl>
@@
identifier ops;
@@
-struct snd_soc_dai_ops ops =
+const struct snd_soc_dai_ops ops =
{ ... };
// </smpl>
Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Diffstat (limited to 'sound/soc/codecs')
80 files changed, 102 insertions, 102 deletions
diff --git a/sound/soc/codecs/88pm860x-codec.c b/sound/soc/codecs/88pm860x-codec.c index 5ca122e..ea305b8 100644 --- a/sound/soc/codecs/88pm860x-codec.c +++ b/sound/soc/codecs/88pm860x-codec.c @@ -1198,14 +1198,14 @@ static int pm860x_set_bias_level(struct snd_soc_codec *codec, return 0; } -static struct snd_soc_dai_ops pm860x_pcm_dai_ops = { +static const struct snd_soc_dai_ops pm860x_pcm_dai_ops = { .digital_mute = pm860x_digital_mute, .hw_params = pm860x_pcm_hw_params, .set_fmt = pm860x_pcm_set_dai_fmt, .set_sysclk = pm860x_set_dai_sysclk, }; -static struct snd_soc_dai_ops pm860x_i2s_dai_ops = { +static const struct snd_soc_dai_ops pm860x_i2s_dai_ops = { .digital_mute = pm860x_digital_mute, .hw_params = pm860x_i2s_hw_params, .set_fmt = pm860x_i2s_set_dai_fmt, diff --git a/sound/soc/codecs/ac97.c b/sound/soc/codecs/ac97.c index e715186..8f32167 100644 --- a/sound/soc/codecs/ac97.c +++ b/sound/soc/codecs/ac97.c @@ -39,7 +39,7 @@ static int ac97_prepare(struct snd_pcm_substream *substream, SNDRV_PCM_RATE_22050 | SNDRV_PCM_RATE_44100 |\ SNDRV_PCM_RATE_48000) -static struct snd_soc_dai_ops ac97_dai_ops = { +static const struct snd_soc_dai_ops ac97_dai_ops = { .prepare = ac97_prepare, }; diff --git a/sound/soc/codecs/ad1836.c b/sound/soc/codecs/ad1836.c index 4e5c572..fab0948 100644 --- a/sound/soc/codecs/ad1836.c +++ b/sound/soc/codecs/ad1836.c @@ -189,7 +189,7 @@ static int ad1836_hw_params(struct snd_pcm_substream *substream, return 0; } -static struct snd_soc_dai_ops ad1836_dai_ops = { +static const struct snd_soc_dai_ops ad1836_dai_ops = { .hw_params = ad1836_hw_params, .set_fmt = ad1836_set_dai_fmt, }; diff --git a/sound/soc/codecs/ad193x.c b/sound/soc/codecs/ad193x.c index 1206021..1901cd2 100644 --- a/sound/soc/codecs/ad193x.c +++ b/sound/soc/codecs/ad193x.c @@ -312,7 +312,7 @@ static int ad193x_hw_params(struct snd_pcm_substream *substream, return 0; } -static struct snd_soc_dai_ops ad193x_dai_ops = { +static const struct snd_soc_dai_ops ad193x_dai_ops = { .hw_params = ad193x_hw_params, .digital_mute = ad193x_mute, .set_tdm_slot = ad193x_set_tdm_slot, diff --git a/sound/soc/codecs/adau1373.c b/sound/soc/codecs/adau1373.c index 45c6302..2e040af 100644 --- a/sound/soc/codecs/adau1373.c +++ b/sound/soc/codecs/adau1373.c @@ -1042,7 +1042,7 @@ static int adau1373_set_dai_sysclk(struct snd_soc_dai *dai, return 0; } -static const struct snd_soc_dai_ops adau1373_dai_ops = { +static const const struct snd_soc_dai_ops adau1373_dai_ops = { .hw_params = adau1373_hw_params, .set_sysclk = adau1373_set_dai_sysclk, .set_fmt = adau1373_set_dai_fmt, diff --git a/sound/soc/codecs/adau1701.c b/sound/soc/codecs/adau1701.c index 8b7e1c5..c69bdfe 100644 --- a/sound/soc/codecs/adau1701.c +++ b/sound/soc/codecs/adau1701.c @@ -427,7 +427,7 @@ static int adau1701_set_sysclk(struct snd_soc_codec *codec, int clk_id, #define ADAU1701_FORMATS (SNDRV_PCM_FMTBIT_S16_LE | SNDRV_PCM_FMTBIT_S20_3LE |\ SNDRV_PCM_FMTBIT_S24_LE) -static const struct snd_soc_dai_ops adau1701_dai_ops = { +static const const struct snd_soc_dai_ops adau1701_dai_ops = { .set_fmt = adau1701_set_dai_fmt, .hw_params = adau1701_hw_params, .digital_mute = adau1701_digital_mute, diff --git a/sound/soc/codecs/adav80x.c b/sound/soc/codecs/adav80x.c index f9f0894..d927feb 100644 --- a/sound/soc/codecs/adav80x.c +++ b/sound/soc/codecs/adav80x.c @@ -718,7 +718,7 @@ static void adav80x_dai_shutdown(struct snd_pcm_substream *substream, adav80x->rate = 0; } -static const struct snd_soc_dai_ops adav80x_dai_ops = { +static const const struct snd_soc_dai_ops adav80x_dai_ops = { .set_fmt = adav80x_set_dai_fmt, .hw_params = adav80x_hw_params, .startup = adav80x_dai_startup, diff --git a/sound/soc/codecs/ak4104.c b/sound/soc/codecs/ak4104.c index d3b29dc..152420c 100644 --- a/sound/soc/codecs/ak4104.c +++ b/sound/soc/codecs/ak4104.c @@ -170,7 +170,7 @@ static int ak4104_hw_params(struct snd_pcm_substream *substream, return ak4104_spi_write(codec, AK4104_REG_CHN_STATUS(3), val); } -static struct snd_soc_dai_ops ak4101_dai_ops = { +static const struct snd_soc_dai_ops ak4101_dai_ops = { .hw_params = ak4104_hw_params, .set_fmt = ak4104_set_dai_fmt, }; diff --git a/sound/soc/codecs/ak4535.c b/sound/soc/codecs/ak4535.c index 95d782d..f6c4734 100644 --- a/sound/soc/codecs/ak4535.c +++ b/sound/soc/codecs/ak4535.c @@ -331,7 +331,7 @@ static int ak4535_set_bias_level(struct snd_soc_codec *codec, SNDRV_PCM_RATE_16000 | SNDRV_PCM_RATE_22050 |\ SNDRV_PCM_RATE_44100 | SNDRV_PCM_RATE_48000) -static struct snd_soc_dai_ops ak4535_dai_ops = { +static const struct snd_soc_dai_ops ak4535_dai_ops = { .hw_params = ak4535_hw_params, .set_fmt = ak4535_set_dai_fmt, .digital_mute = ak4535_mute, diff --git a/sound/soc/codecs/ak4641.c b/sound/soc/codecs/ak4641.c index 7783858..3657c76 100644 --- a/sound/soc/codecs/ak4641.c +++ b/sound/soc/codecs/ak4641.c @@ -442,14 +442,14 @@ static int ak4641_set_bias_level(struct snd_soc_codec *codec, SNDRV_PCM_RATE_16000) #define AK4641_FORMATS (SNDRV_PCM_FMTBIT_S16_LE) -static struct snd_soc_dai_ops ak4641_i2s_dai_ops = { +static const struct snd_soc_dai_ops ak4641_i2s_dai_ops = { .hw_params = ak4641_i2s_hw_params, .set_fmt = ak4641_i2s_set_dai_fmt, .digital_mute = ak4641_mute, .set_sysclk = ak4641_set_dai_sysclk, }; -static struct snd_soc_dai_ops ak4641_pcm_dai_ops = { +static const struct snd_soc_dai_ops ak4641_pcm_dai_ops = { .hw_params = NULL, /* rates are controlled by BT chip */ .set_fmt = ak4641_pcm_set_dai_fmt, .digital_mute = ak4641_mute, diff --git a/sound/soc/codecs/ak4642.c b/sound/soc/codecs/ak4642.c index 859e015..c887ddf 100644 --- a/sound/soc/codecs/ak4642.c +++ b/sound/soc/codecs/ak4642.c @@ -435,7 +435,7 @@ static int ak4642_set_bias_level(struct snd_soc_codec *codec, return 0; } -static struct snd_soc_dai_ops ak4642_dai_ops = { +static const struct snd_soc_dai_ops ak4642_dai_ops = { .startup = ak4642_dai_startup, .shutdown = ak4642_dai_shutdown, .set_sysclk = ak4642_dai_set_sysclk, diff --git a/sound/soc/codecs/ak4671.c b/sound/soc/codecs/ak4671.c index de9ff66..4f5c69f 100644 --- a/sound/soc/codecs/ak4671.c +++ b/sound/soc/codecs/ak4671.c @@ -594,7 +594,7 @@ static int ak4671_set_bias_level(struct snd_soc_codec *codec, #define AK4671_FORMATS SNDRV_PCM_FMTBIT_S16_LE -static struct snd_soc_dai_ops ak4671_dai_ops = { +static const struct snd_soc_dai_ops ak4671_dai_ops = { .hw_params = ak4671_hw_params, .set_sysclk = ak4671_set_dai_sysclk, .set_fmt = ak4671_set_dai_fmt, diff --git a/sound/soc/codecs/alc5623.c b/sound/soc/codecs/alc5623.c index 984b14b..88647d3 100644 --- a/sound/soc/codecs/alc5623.c +++ b/sound/soc/codecs/alc5623.c @@ -839,7 +839,7 @@ static int alc5623_set_bias_level(struct snd_soc_codec *codec, | SNDRV_PCM_FMTBIT_S24_LE \ | SNDRV_PCM_FMTBIT_S32_LE) -static struct snd_soc_dai_ops alc5623_dai_ops = { +static const struct snd_soc_dai_ops alc5623_dai_ops = { .hw_params = alc5623_pcm_hw_params, .digital_mute = alc5623_mute, .set_fmt = alc5623_set_dai_fmt, diff --git a/sound/soc/codecs/alc5632.c b/sound/soc/codecs/alc5632.c index 2d77665..3f750de 100644 --- a/sound/soc/codecs/alc5632.c +++ b/sound/soc/codecs/alc5632.c @@ -924,7 +924,7 @@ static int alc5632_set_bias_level(struct snd_soc_codec *codec, | SNDRV_PCM_FMTBIT_S24_LE \ | SNDRV_PCM_FMTBIT_S32_LE) -static struct snd_soc_dai_ops alc5632_dai_ops = { +static const struct snd_soc_dai_ops alc5632_dai_ops = { .hw_params = alc5632_pcm_hw_params, .digital_mute = alc5632_mute, .set_fmt = alc5632_set_dai_fmt, diff --git a/sound/soc/codecs/cq93vc.c b/sound/soc/codecs/cq93vc.c index 46dbfd0..cbb3028 100644 --- a/sound/soc/codecs/cq93vc.c +++ b/sound/soc/codecs/cq93vc.c @@ -122,7 +122,7 @@ static int cq93vc_set_bias_level(struct snd_soc_codec *codec, #define CQ93VC_RATES (SNDRV_PCM_RATE_8000 | SNDRV_PCM_RATE_16000) #define CQ93VC_FORMATS (SNDRV_PCM_FMTBIT_U8 | SNDRV_PCM_FMTBIT_S16_LE) -static struct snd_soc_dai_ops cq93vc_dai_ops = { +static const struct snd_soc_dai_ops cq93vc_dai_ops = { .digital_mute = cq93vc_mute, .set_sysclk = cq93vc_set_dai_sysclk, }; diff --git a/sound/soc/codecs/cs4270.c b/sound/soc/codecs/cs4270.c index 73f46eb..5396b91 100644 --- a/sound/soc/codecs/cs4270.c +++ b/sound/soc/codecs/cs4270.c @@ -447,7 +447,7 @@ static const struct snd_kcontrol_new cs4270_snd_controls[] = { snd_soc_get_volsw, cs4270_soc_put_mute), }; -static struct snd_soc_dai_ops cs4270_dai_ops = { +static const struct snd_soc_dai_ops cs4270_dai_ops = { .hw_params = cs4270_hw_params, .set_sysclk = cs4270_set_dai_sysclk, .set_fmt = cs4270_set_dai_fmt, diff --git a/sound/soc/codecs/cs4271.c b/sound/soc/codecs/cs4271.c index 69fde15..a6f77a8 100644 --- a/sound/soc/codecs/cs4271.c +++ b/sound/soc/codecs/cs4271.c @@ -402,7 +402,7 @@ static const struct snd_kcontrol_new cs4271_snd_controls[] = { 7, 1, 1), }; -static struct snd_soc_dai_ops cs4271_dai_ops = { +static const struct snd_soc_dai_ops cs4271_dai_ops = { .hw_params = cs4271_hw_params, .set_sysclk = cs4271_set_dai_sysclk, .set_fmt = cs4271_set_dai_fmt, diff --git a/sound/soc/codecs/cs42l51.c b/sound/soc/codecs/cs42l51.c index 00718b5..e378c4d 100644 --- a/sound/soc/codecs/cs42l51.c +++ b/sound/soc/codecs/cs42l51.c @@ -483,7 +483,7 @@ static int cs42l51_dai_mute(struct snd_soc_dai *dai, int mute) return snd_soc_write(codec, CS42L51_DAC_OUT_CTL, reg); } -static struct snd_soc_dai_ops cs42l51_dai_ops = { +static const struct snd_soc_dai_ops cs42l51_dai_ops = { .hw_params = cs42l51_hw_params, .set_sysclk = cs42l51_set_dai_sysclk, .set_fmt = cs42l51_set_dai_fmt, diff --git a/sound/soc/codecs/cs42l73.c b/sound/soc/codecs/cs42l73.c index d09578f..75d80b2 100644 --- a/sound/soc/codecs/cs42l73.c +++ b/sound/soc/codecs/cs42l73.c @@ -1190,7 +1190,7 @@ static int cs42l73_pcm_startup(struct snd_pcm_substream *substream, #define CS42L73_FORMATS (SNDRV_PCM_FMTBIT_S16_LE | SNDRV_PCM_FMTBIT_S20_3LE |\ SNDRV_PCM_FMTBIT_S24_LE) -static const struct snd_soc_dai_ops cs42l73_ops = { +static const const struct snd_soc_dai_ops cs42l73_ops = { .startup = cs42l73_pcm_startup, .hw_params = cs42l73_pcm_hw_params, .set_fmt = cs42l73_set_dai_fmt, diff --git a/sound/soc/codecs/da7210.c b/sound/soc/codecs/da7210.c index 8b5848a..8ef820f 100644 --- a/sound/soc/codecs/da7210.c +++ b/sound/soc/codecs/da7210.c @@ -761,7 +761,7 @@ static int da7210_mute(struct snd_soc_dai *dai, int mute) SNDRV_PCM_FMTBIT_S24_LE | SNDRV_PCM_FMTBIT_S32_LE) /* DAI operations */ -static struct snd_soc_dai_ops da7210_dai_ops = { +static const struct snd_soc_dai_ops da7210_dai_ops = { .hw_params = da7210_hw_params, .set_fmt = da7210_set_dai_fmt, .digital_mute = da7210_mute, diff --git a/sound/soc/codecs/jz4740.c b/sound/soc/codecs/jz4740.c index e373f8f..64a479c 100644 --- a/sound/soc/codecs/jz4740.c +++ b/sound/soc/codecs/jz4740.c @@ -206,7 +206,7 @@ static int jz4740_codec_hw_params(struct snd_pcm_substream *substream, return 0; } -static struct snd_soc_dai_ops jz4740_codec_dai_ops = { +static const struct snd_soc_dai_ops jz4740_codec_dai_ops = { .hw_params = jz4740_codec_hw_params, }; diff --git a/sound/soc/codecs/max98088.c b/sound/soc/codecs/max98088.c index ebbf63c..48a52a1 100644 --- a/sound/soc/codecs/max98088.c +++ b/sound/soc/codecs/max98088.c @@ -1650,14 +1650,14 @@ static int max98088_set_bias_level(struct snd_soc_codec *codec, #define MAX98088_RATES SNDRV_PCM_RATE_8000_96000 #define MAX98088_FORMATS (SNDRV_PCM_FMTBIT_S16_LE | SNDRV_PCM_FMTBIT_S24_LE) -static struct snd_soc_dai_ops max98088_dai1_ops = { +static const struct snd_soc_dai_ops max98088_dai1_ops = { .set_sysclk = max98088_dai_set_sysclk, .set_fmt = max98088_dai1_set_fmt, .hw_params = max98088_dai1_hw_params, .digital_mute = max98088_dai1_digital_mute, }; -static struct snd_soc_dai_ops max98088_dai2_ops = { +static const struct snd_soc_dai_ops max98088_dai2_ops = { .set_sysclk = max98088_dai_set_sysclk, .set_fmt = max98088_dai2_set_fmt, .hw_params = max98088_dai2_hw_params, diff --git a/sound/soc/codecs/max98095.c b/sound/soc/codecs/max98095.c index 26d7b08..cc712d5 100644 --- a/sound/soc/codecs/max98095.c +++ b/sound/soc/codecs/max98095.c @@ -1782,19 +1782,19 @@ static int max98095_set_bias_level(struct snd_soc_codec *codec, #define MAX98095_RATES SNDRV_PCM_RATE_8000_96000 #define MAX98095_FORMATS (SNDRV_PCM_FMTBIT_S16_LE | SNDRV_PCM_FMTBIT_S24_LE) -static struct snd_soc_dai_ops max98095_dai1_ops = { +static const struct snd_soc_dai_ops max98095_dai1_ops = { .set_sysclk = max98095_dai_set_sysclk, .set_fmt = max98095_dai1_set_fmt, .hw_params = max98095_dai1_hw_params, }; -static struct snd_soc_dai_ops max98095_dai2_ops = { +static const struct snd_soc_dai_ops max98095_dai2_ops = { .set_sysclk = max98095_dai_set_sysclk, .set_fmt = max98095_dai2_set_fmt, .hw_params = max98095_dai2_hw_params, }; -static struct snd_soc_dai_ops max98095_dai3_ops = { +static const struct snd_soc_dai_ops max98095_dai3_ops = { .set_sysclk = max98095_dai_set_sysclk, .set_fmt = max98095_dai3_set_fmt, .hw_params = max98095_dai3_hw_params, diff --git a/sound/soc/codecs/max9850.c b/sound/soc/codecs/max9850.c index 208d2ee..94c2b58 100644 --- a/sound/soc/codecs/max9850.c +++ b/sound/soc/codecs/max9850.c @@ -254,7 +254,7 @@ static int max9850_set_bias_level(struct snd_soc_codec *codec, #define MAX9850_FORMATS (SNDRV_PCM_FMTBIT_S16_LE | SNDRV_PCM_FMTBIT_S20_3LE |\ SNDRV_PCM_FMTBIT_S24_LE) -static struct snd_soc_dai_ops max9850_dai_ops = { +static const struct snd_soc_dai_ops max9850_dai_ops = { .hw_params = max9850_hw_params, .set_sysclk = max9850_set_dai_sysclk, .set_fmt = max9850_set_dai_fmt, diff --git a/sound/soc/codecs/rt5631.c b/sound/soc/codecs/rt5631.c index 4646e80..dac4d05 100644 --- a/sound/soc/codecs/rt5631.c +++ b/sound/soc/codecs/rt5631.c @@ -1664,7 +1664,7 @@ static int rt5631_resume(struct snd_soc_codec *codec) SNDRV_PCM_FMTBIT_S24_LE | \ SNDRV_PCM_FMTBIT_S8) -static struct snd_soc_dai_ops rt5631_ops = { +static const struct snd_soc_dai_ops rt5631_ops = { .hw_params = rt5631_hifi_pcm_params, .set_fmt = rt5631_hifi_codec_set_dai_fmt, .set_sysclk = rt5631_hifi_codec_set_dai_sysclk, diff --git a/sound/soc/codecs/sgtl5000.c b/sound/soc/codecs/sgtl5000.c index bbcf921..1a6564b 100644 --- a/sound/soc/codecs/sgtl5000.c +++ b/sound/soc/codecs/sgtl5000.c @@ -923,7 +923,7 @@ static int sgtl5000_set_bias_level(struct snd_soc_codec *codec, SNDRV_PCM_FMTBIT_S24_LE |\ SNDRV_PCM_FMTBIT_S32_LE) -static struct snd_soc_dai_ops sgtl5000_ops = { +static const struct snd_soc_dai_ops sgtl5000_ops = { .hw_params = sgtl5000_pcm_hw_params, .digital_mute = sgtl5000_digital_mute, .set_fmt = sgtl5000_set_dai_fmt, diff --git a/sound/soc/codecs/sn95031.c b/sound/soc/codecs/sn95031.c index 887d618..65f2ef9 100644 --- a/sound/soc/codecs/sn95031.c +++ b/sound/soc/codecs/sn95031.c @@ -698,21 +698,21 @@ static int sn95031_pcm_hw_params(struct snd_pcm_substream *substream, } /* Codec DAI section */ -static struct snd_soc_dai_ops sn95031_headset_dai_ops = { +static const struct snd_soc_dai_ops sn95031_headset_dai_ops = { .digital_mute = sn95031_pcm_hs_mute, .hw_params = sn95031_pcm_hw_params, }; -static struct snd_soc_dai_ops sn95031_speaker_dai_ops = { +static const struct snd_soc_dai_ops sn95031_speaker_dai_ops = { .digital_mute = sn95031_pcm_spkr_mute, .hw_params = sn95031_pcm_hw_params, }; -static struct snd_soc_dai_ops sn95031_vib1_dai_ops = { +static const struct snd_soc_dai_ops sn95031_vib1_dai_ops = { .hw_params = sn95031_pcm_hw_params, }; -static struct snd_soc_dai_ops sn95031_vib2_dai_ops = { +static const struct snd_soc_dai_ops sn95031_vib2_dai_ops = { .hw_params = sn95031_pcm_hw_params, }; diff --git a/sound/soc/codecs/ssm2602.c b/sound/soc/codecs/ssm2602.c index 3cb3271..620411c 100644 --- a/sound/soc/codecs/ssm2602.c +++ b/sound/soc/codecs/ssm2602.c @@ -498,7 +498,7 @@ static int ssm2602_set_bias_level(struct snd_soc_codec *codec, #define SSM2602_FORMATS (SNDRV_PCM_FMTBIT_S16_LE | SNDRV_PCM_FMTBIT_S20_3LE |\ SNDRV_PCM_FMTBIT_S24_LE | SNDRV_PCM_FMTBIT_S32_LE) -static struct snd_soc_dai_ops ssm2602_dai_ops = { +static const struct snd_soc_dai_ops ssm2602_dai_ops = { .startup = ssm2602_startup, .hw_params = ssm2602_hw_params, .shutdown = ssm2602_shutdown, diff --git a/sound/soc/codecs/sta32x.c b/sound/soc/codecs/sta32x.c index 3b0deaf..e2b1cde 100644 --- a/sound/soc/codecs/sta32x.c +++ b/sound/soc/codecs/sta32x.c @@ -783,7 +783,7 @@ static int sta32x_set_bias_level(struct snd_soc_codec *codec, return 0; } -static struct snd_soc_dai_ops sta32x_dai_ops = { +static const struct snd_soc_dai_ops sta32x_dai_ops = { .hw_params = sta32x_hw_params, .set_sysclk = sta32x_set_dai_sysclk, .set_fmt = sta32x_set_dai_fmt, diff --git a/sound/soc/codecs/stac9766.c b/sound/soc/codecs/stac9766.c index 78b2b50..e4783a4 100644 --- a/sound/soc/codecs/stac9766.c +++ b/sound/soc/codecs/stac9766.c @@ -286,11 +286,11 @@ reset: return 0; } -static struct snd_soc_dai_ops stac9766_dai_ops_analog = { +static const struct snd_soc_dai_ops stac9766_dai_ops_analog = { .prepare = ac97_analog_prepare, }; -static struct snd_soc_dai_ops stac9766_dai_ops_digital = { +static const struct snd_soc_dai_ops stac9766_dai_ops_digital = { .prepare = ac97_digital_prepare, }; diff --git a/sound/soc/codecs/tlv320aic23.c b/sound/soc/codecs/tlv320aic23.c index 336de8f..9782631 100644 --- a/sound/soc/codecs/tlv320aic23.c +++ b/sound/soc/codecs/tlv320aic23.c @@ -503,7 +503,7 @@ static int tlv320aic23_set_bias_level(struct snd_soc_codec *codec, #define AIC23_FORMATS (SNDRV_PCM_FMTBIT_S16_LE | SNDRV_PCM_FMTBIT_S20_3LE | \ SNDRV_PCM_FMTBIT_S24_3LE | SNDRV_PCM_FMTBIT_S32_LE) -static struct snd_soc_dai_ops tlv320aic23_dai_ops = { +static const struct snd_soc_dai_ops tlv320aic23_dai_ops = { .prepare = tlv320aic23_pcm_prepare, .hw_params = tlv320aic23_hw_params, .shutdown = tlv320aic23_shutdown, diff --git a/sound/soc/codecs/tlv320aic26.c b/sound/soc/codecs/tlv320aic26.c index 7859bdc..86d1fa3 100644 --- a/sound/soc/codecs/tlv320aic26.c +++ b/sound/soc/codecs/tlv320aic26.c @@ -275,7 +275,7 @@ static int aic26_set_fmt(struct snd_soc_dai *codec_dai, unsigned int fmt) #define AIC26_FORMATS (SNDRV_PCM_FMTBIT_S8 | SNDRV_PCM_FMTBIT_S16_BE |\ SNDRV_PCM_FMTBIT_S24_BE | SNDRV_PCM_FMTBIT_S32_BE) -static struct snd_soc_dai_ops aic26_dai_ops = { +static const struct snd_soc_dai_ops aic26_dai_ops = { .hw_params = aic26_hw_params, .digital_mute = aic26_mute, .set_sysclk = aic26_set_sysclk, diff --git a/sound/soc/codecs/tlv320aic32x4.c b/sound/soc/codecs/tlv320aic32x4.c index b21c610..d2e38af 100644 --- a/sound/soc/codecs/tlv320aic32x4.c +++ b/sound/soc/codecs/tlv320aic32x4.c @@ -597,7 +597,7 @@ static int aic32x4_set_bias_level(struct snd_soc_codec *codec, #define AIC32X4_FORMATS (SNDRV_PCM_FMTBIT_S16_LE | SNDRV_PCM_FMTBIT_S20_3LE \ | SNDRV_PCM_FMTBIT_S24_3LE | SNDRV_PCM_FMTBIT_S32_LE) -static struct snd_soc_dai_ops aic32x4_ops = { +static const struct snd_soc_dai_ops aic32x4_ops = { .hw_params = aic32x4_hw_params, .digital_mute = aic32x4_mute, .set_fmt = aic32x4_set_dai_fmt, diff --git a/sound/soc/codecs/tlv320aic3x.c b/sound/soc/codecs/tlv320aic3x.c index 2e2bf18..7d665ea 100644 --- a/sound/soc/codecs/tlv320aic3x.c +++ b/sound/soc/codecs/tlv320aic3x.c @@ -1244,7 +1244,7 @@ EXPORT_SYMBOL_GPL(aic3x_button_pressed); #define AIC3X_FORMATS (SNDRV_PCM_FMTBIT_S16_LE | SNDRV_PCM_FMTBIT_S20_3LE | \ SNDRV_PCM_FMTBIT_S24_3LE | SNDRV_PCM_FMTBIT_S32_LE) -static struct snd_soc_dai_ops aic3x_dai_ops = { +static const struct snd_soc_dai_ops aic3x_dai_ops = { .hw_params = aic3x_hw_params, .digital_mute = aic3x_mute, .set_sysclk = aic3x_set_dai_sysclk, diff --git a/sound/soc/codecs/tlv320dac33.c b/sound/soc/codecs/tlv320dac33.c index dc8a2b2..abcb97e 100644 --- a/sound/soc/codecs/tlv320dac33.c +++ b/sound/soc/codecs/tlv320dac33.c @@ -1499,7 +1499,7 @@ static struct snd_soc_codec_driver soc_codec_dev_tlv320dac33 = { SNDRV_PCM_RATE_48000) #define DAC33_FORMATS (SNDRV_PCM_FMTBIT_S16_LE | SNDRV_PCM_FMTBIT_S32_LE) -static struct snd_soc_dai_ops dac33_dai_ops = { +static const struct snd_soc_dai_ops dac33_dai_ops = { .startup = dac33_startup, .shutdown = dac33_shutdown, .hw_params = dac33_hw_params, diff --git a/sound/soc/codecs/twl4030.c b/sound/soc/codecs/twl4030.c index f798247..2a3a528 100644 --- a/sound/soc/codecs/twl4030.c +++ b/sound/soc/codecs/twl4030.c @@ -2149,7 +2149,7 @@ static int twl4030_voice_set_tristate(struct snd_soc_dai *dai, int tristate) #define TWL4030_RATES (SNDRV_PCM_RATE_8000_48000) #define TWL4030_FORMATS (SNDRV_PCM_FMTBIT_S16_LE | SNDRV_PCM_FMTBIT_S32_LE) -static struct snd_soc_dai_ops twl4030_dai_hifi_ops = { +static const struct snd_soc_dai_ops twl4030_dai_hifi_ops = { .startup = twl4030_startup, .shutdown = twl4030_shutdown, .hw_params = twl4030_hw_params, @@ -2158,7 +2158,7 @@ static struct snd_soc_dai_ops twl4030_dai_hifi_ops = { .set_tristate = twl4030_set_tristate, }; -static struct snd_soc_dai_ops twl4030_dai_voice_ops = { +static const struct snd_soc_dai_ops twl4030_dai_voice_ops = { .startup = twl4030_voice_startup, .shutdown = twl4030_voice_shutdown, .hw_params = twl4030_voice_hw_params, diff --git a/sound/soc/codecs/twl6040.c b/sound/soc/codecs/twl6040.c index 73e11f0..17930ed 100644 --- a/sound/soc/codecs/twl6040.c +++ b/sound/soc/codecs/twl6040.c @@ -1397,7 +1397,7 @@ static int twl6040_set_dai_sysclk(struct snd_soc_dai *codec_dai, return 0; } -static struct snd_soc_dai_ops twl6040_dai_ops = { +static const struct snd_soc_dai_ops twl6040_dai_ops = { .startup = twl6040_startup, .hw_params = twl6040_hw_params, .prepare = twl6040_prepare, diff --git a/sound/soc/codecs/uda134x.c b/sound/soc/codecs/uda134x.c index a7b8f30..486aef6 100644 --- a/sound/soc/codecs/uda134x.c +++ b/sound/soc/codecs/uda134x.c @@ -452,7 +452,7 @@ SOC_ENUM("PCM Playback De-emphasis", uda134x_mixer_enum[1]), SOC_SINGLE("DC Filter Enable Switch", UDA134X_STATUS0, 0, 1, 0), }; -static struct snd_soc_dai_ops uda134x_dai_ops = { +static const struct snd_soc_dai_ops uda134x_dai_ops = { .startup = uda134x_startup, .shutdown = uda134x_shutdown, .hw_params = uda134x_hw_params, diff --git a/sound/soc/codecs/uda1380.c b/sound/soc/codecs/uda1380.c index c5ca8cf..6b933ef 100644 --- a/sound/soc/codecs/uda1380.c +++ b/sound/soc/codecs/uda1380.c @@ -643,21 +643,21 @@ static int uda1380_set_bias_level(struct snd_soc_codec *codec, SNDRV_PCM_RATE_16000 | SNDRV_PCM_RATE_22050 |\ SNDRV_PCM_RATE_44100 | SNDRV_PCM_RATE_48000) -static struct snd_soc_dai_ops uda1380_dai_ops = { +static const struct snd_soc_dai_ops uda1380_dai_ops = { .hw_params = uda1380_pcm_hw_params, .shutdown = uda1380_pcm_shutdown, .trigger = uda1380_trigger, .set_fmt = uda1380_set_dai_fmt_both, }; -static struct snd_soc_dai_ops uda1380_dai_ops_playback = { +static const struct snd_soc_dai_ops uda1380_dai_ops_playback = { .hw_params = uda1380_pcm_hw_params, .shutdown = uda1380_pcm_shutdown, .trigger = uda1380_trigger, .set_fmt = uda1380_set_dai_fmt_playback, }; -static struct snd_soc_dai_ops uda1380_dai_ops_capture = { +static const struct snd_soc_dai_ops uda1380_dai_ops_capture = { .hw_params = uda1380_pcm_hw_params, .shutdown = uda1380_pcm_shutdown, .trigger = uda1380_trigger, diff --git a/sound/soc/codecs/wl1273.c b/sound/soc/codecs/wl1273.c index a854989..9531c35 100644 --- a/sound/soc/codecs/wl1273.c +++ b/sound/soc/codecs/wl1273.c @@ -386,7 +386,7 @@ static int wl1273_hw_params(struct snd_pcm_substream *substream, return 0; } -static struct snd_soc_dai_ops wl1273_dai_ops = { +static const struct snd_soc_dai_ops wl1273_dai_ops = { .startup = wl1273_startup, .hw_params = wl1273_hw_params, }; diff --git a/sound/soc/codecs/wm5100.c b/sound/soc/codecs/wm5100.c index f37d67f..6c79d97 100644 --- a/sound/soc/codecs/wm5100.c +++ b/sound/soc/codecs/wm5100.c @@ -1661,7 +1661,7 @@ static int wm5100_hw_params(struct snd_pcm_substream *substream, return 0; } -static struct snd_soc_dai_ops wm5100_dai_ops = { +static const struct snd_soc_dai_ops wm5100_dai_ops = { .set_fmt = wm5100_set_fmt, .hw_params = wm5100_hw_params, }; diff --git a/sound/soc/codecs/wm8350.c b/sound/soc/codecs/wm8350.c index 35f3ad83..3b846c9 100644 --- a/sound/soc/codecs/wm8350.c +++ b/sound/soc/codecs/wm8350.c @@ -1511,7 +1511,7 @@ EXPORT_SYMBOL_GPL(wm8350_mic_jack_detect); SNDRV_PCM_FMTBIT_S20_3LE |\ SNDRV_PCM_FMTBIT_S24_LE) -static struct snd_soc_dai_ops wm8350_dai_ops = { +static const struct snd_soc_dai_ops wm8350_dai_ops = { .hw_params = wm8350_pcm_hw_params, .digital_mute = wm8350_mute, .trigger = wm8350_pcm_trigger, diff --git a/sound/soc/codecs/wm8400.c b/sound/soc/codecs/wm8400.c index 585def1..07d84a8 100644 --- a/sound/soc/codecs/wm8400.c +++ b/sound/soc/codecs/wm8400.c @@ -1316,7 +1316,7 @@ static int wm8400_set_bias_level(struct snd_soc_codec *codec, #define WM8400_FORMATS (SNDRV_PCM_FMTBIT_S16_LE | SNDRV_PCM_FMTBIT_S20_3LE |\ SNDRV_PCM_FMTBIT_S24_LE) -static struct snd_soc_dai_ops wm8400_dai_ops = { +static const struct snd_soc_dai_ops wm8400_dai_ops = { .hw_params = wm8400_hw_params, .digital_mute = wm8400_mute, .set_fmt = wm8400_set_dai_fmt, diff --git a/sound/soc/codecs/wm8510.c b/sound/soc/codecs/wm8510.c index 07c9cc7..26571b2 100644 --- a/sound/soc/codecs/wm8510.c +++ b/sound/soc/codecs/wm8510.c @@ -509,7 +509,7 @@ static int wm8510_set_bias_level(struct snd_soc_codec *codec, #define WM8510_FORMATS (SNDRV_PCM_FMTBIT_S16_LE | SNDRV_PCM_FMTBIT_S20_3LE |\ SNDRV_PCM_FMTBIT_S24_LE | SNDRV_PCM_FMTBIT_S32_LE) -static struct snd_soc_dai_ops wm8510_dai_ops = { +static const struct snd_soc_dai_ops wm8510_dai_ops = { .hw_params = wm8510_pcm_hw_params, .digital_mute = wm8510_mute, .set_fmt = wm8510_set_dai_fmt, diff --git a/sound/soc/codecs/wm8523.c b/sound/soc/codecs/wm8523.c index db7a681..d0ae82d 100644 --- a/sound/soc/codecs/wm8523.c +++ b/sound/soc/codecs/wm8523.c @@ -365,7 +365,7 @@ static int wm8523_set_bias_level(struct snd_soc_codec *codec, #define WM8523_FORMATS (SNDRV_PCM_FMTBIT_S16_LE | SNDRV_PCM_FMTBIT_S20_3LE |\ SNDRV_PCM_FMTBIT_S24_LE | SNDRV_PCM_FMTBIT_S32_LE) -static struct snd_soc_dai_ops wm8523_dai_ops = { +static const struct snd_soc_dai_ops wm8523_dai_ops = { .startup = wm8523_startup, .hw_params = wm8523_hw_params, .set_sysclk = wm8523_set_dai_sysclk, diff --git a/sound/soc/codecs/wm8580.c b/sound/soc/codecs/wm8580.c index 8212b3c..0aa3e4d 100644 --- a/sound/soc/codecs/wm8580.c +++ b/sound/soc/codecs/wm8580.c @@ -776,7 +776,7 @@ static int wm8580_set_bias_level(struct snd_soc_codec *codec, #define WM8580_FORMATS (SNDRV_PCM_FMTBIT_S16_LE | SNDRV_PCM_FMTBIT_S20_3LE |\ SNDRV_PCM_FMTBIT_S24_LE | SNDRV_PCM_FMTBIT_S32_LE) -static struct snd_soc_dai_ops wm8580_dai_ops_playback = { +static const struct snd_soc_dai_ops wm8580_dai_ops_playback = { .set_sysclk = wm8580_set_sysclk, .hw_params = wm8580_paif_hw_params, .set_fmt = wm8580_set_paif_dai_fmt, @@ -785,7 +785,7 @@ static struct snd_soc_dai_ops wm8580_dai_ops_playback = { .digital_mute = wm8580_digital_mute, }; -static struct snd_soc_dai_ops wm8580_dai_ops_capture = { +static const struct snd_soc_dai_ops wm8580_dai_ops_capture = { .set_sysclk = wm8580_set_sysclk, .hw_params = wm8580_paif_hw_params, .set_fmt = wm8580_set_paif_dai_fmt, diff --git a/sound/soc/codecs/wm8711.c b/sound/soc/codecs/wm8711.c index 076bdb9..a6f1e39 100644 --- a/sound/soc/codecs/wm8711.c +++ b/sound/soc/codecs/wm8711.c @@ -318,7 +318,7 @@ static int wm8711_set_bias_level(struct snd_soc_codec *codec, #define WM8711_FORMATS (SNDRV_PCM_FMTBIT_S16_LE | SNDRV_PCM_FMTBIT_S20_3LE |\ SNDRV_PCM_FMTBIT_S24_LE) -static struct snd_soc_dai_ops wm8711_ops = { +static const struct snd_soc_dai_ops wm8711_ops = { .prepare = wm8711_pcm_prepare, .hw_params = wm8711_hw_params, .shutdown = wm8711_shutdown, diff --git a/sound/soc/codecs/wm8728.c b/sound/soc/codecs/wm8728.c index 04b027e..085c2f8 100644 --- a/sound/soc/codecs/wm8728.c +++ b/sound/soc/codecs/wm8728.c @@ -196,7 +196,7 @@ static int wm8728_set_bias_level(struct snd_soc_codec *codec, #define WM8728_FORMATS (SNDRV_PCM_FMTBIT_S16_LE | SNDRV_PCM_FMTBIT_S20_3LE |\ SNDRV_PCM_FMTBIT_S24_LE) -static struct snd_soc_dai_ops wm8728_dai_ops = { +static const struct snd_soc_dai_ops wm8728_dai_ops = { .hw_params = wm8728_hw_params, .digital_mute = wm8728_mute, .set_fmt = wm8728_set_dai_fmt, diff --git a/sound/soc/codecs/wm8731.c b/sound/soc/codecs/wm8731.c index ca59622..28972d8 100644 --- a/sound/soc/codecs/wm8731.c +++ b/sound/soc/codecs/wm8731.c @@ -465,7 +465,7 @@ static int wm8731_set_bias_level(struct snd_soc_codec *codec, #define WM8731_FORMATS (SNDRV_PCM_FMTBIT_S16_LE | SNDRV_PCM_FMTBIT_S20_3LE |\ SNDRV_PCM_FMTBIT_S24_LE) -static struct snd_soc_dai_ops wm8731_dai_ops = { +static const struct snd_soc_dai_ops wm8731_dai_ops = { .hw_params = wm8731_hw_params, .digital_mute = wm8731_mute, .set_sysclk = wm8731_set_dai_sysclk, diff --git a/sound/soc/codecs/wm8737.c b/sound/soc/codecs/wm8737.c index f6aef58..b7d6615 100644 --- a/sound/soc/codecs/wm8737.c +++ b/sound/soc/codecs/wm8737.c @@ -521,7 +521,7 @@ static int wm8737_set_bias_level(struct snd_soc_codec *codec, #define WM8737_FORMATS (SNDRV_PCM_FMTBIT_S16_LE | SNDRV_PCM_FMTBIT_S20_3LE |\ SNDRV_PCM_FMTBIT_S24_LE | SNDRV_PCM_FMTBIT_S32_LE) -static struct snd_soc_dai_ops wm8737_dai_ops = { +static const struct snd_soc_dai_ops wm8737_dai_ops = { .hw_params = wm8737_hw_params, .set_sysclk = wm8737_set_dai_sysclk, .set_fmt = wm8737_set_dai_fmt, diff --git a/sound/soc/codecs/wm8741.c b/sound/soc/codecs/wm8741.c index 57ad22a..e51f4f0 100644 --- a/sound/soc/codecs/wm8741.c +++ b/sound/soc/codecs/wm8741.c @@ -382,7 +382,7 @@ static int wm8741_set_dai_fmt(struct snd_soc_dai *codec_dai, #define WM8741_FORMATS (SNDRV_PCM_FMTBIT_S16_LE | SNDRV_PCM_FMTBIT_S20_3LE |\ SNDRV_PCM_FMTBIT_S24_LE | SNDRV_PCM_FMTBIT_S32_LE) -static struct snd_soc_dai_ops wm8741_dai_ops = { +static const struct snd_soc_dai_ops wm8741_dai_ops = { .startup = wm8741_startup, .hw_params = wm8741_hw_params, .set_sysclk = wm8741_set_dai_sysclk, diff --git a/sound/soc/codecs/wm8750.c b/sound/soc/codecs/wm8750.c index ca75a81..dfb41ad 100644 --- a/sound/soc/codecs/wm8750.c +++ b/sound/soc/codecs/wm8750.c @@ -643,7 +643,7 @@ static int wm8750_set_bias_level(struct snd_soc_codec *codec, #define WM8750_FORMATS (SNDRV_PCM_FMTBIT_S16_LE | SNDRV_PCM_FMTBIT_S20_3LE |\ SNDRV_PCM_FMTBIT_S24_LE) -static struct snd_soc_dai_ops wm8750_dai_ops = { +static const struct snd_soc_dai_ops wm8750_dai_ops = { .hw_params = wm8750_pcm_hw_params, .digital_mute = wm8750_mute, .set_fmt = wm8750_set_dai_fmt, diff --git a/sound/soc/codecs/wm8753.c b/sound/soc/codecs/wm8753.c index 13156c83..fb013b1 100644 --- a/sound/soc/codecs/wm8753.c +++ b/sound/soc/codecs/wm8753.c @@ -1315,7 +1315,7 @@ static int wm8753_set_bias_level(struct snd_soc_codec *codec, * 3. Voice disabled - HIFI over HIFI * 4. Voice disabled - HIFI over HIFI, uses voice DAI LRC for capture */ -static struct snd_soc_dai_ops wm8753_dai_ops_hifi_mode = { +static const struct snd_soc_dai_ops wm8753_dai_ops_hifi_mode = { .hw_params = wm8753_i2s_hw_params, .digital_mute = wm8753_mute, .set_fmt = wm8753_hifi_set_dai_fmt, @@ -1324,7 +1324,7 @@ static struct snd_soc_dai_ops wm8753_dai_ops_hifi_mode = { .set_sysclk = wm8753_set_dai_sysclk, }; -static struct snd_soc_dai_ops wm8753_dai_ops_voice_mode = { +static const struct snd_soc_dai_ops wm8753_dai_ops_voice_mode = { .hw_params = wm8753_pcm_hw_params, .digital_mute = wm8753_mute, .set_fmt = wm8753_voice_set_dai_fmt, diff --git a/sound/soc/codecs/wm8770.c b/sound/soc/codecs/wm8770.c index aa05e65..87957e8 100644 --- a/sound/soc/codecs/wm8770.c +++ b/sound/soc/codecs/wm8770.c @@ -528,7 +528,7 @@ static int wm8770_set_bias_level(struct snd_soc_codec *codec, #define WM8770_FORMATS (SNDRV_PCM_FMTBIT_S16_LE | SNDRV_PCM_FMTBIT_S20_3LE | \ SNDRV_PCM_FMTBIT_S24_LE | SNDRV_PCM_FMTBIT_S32_LE) -static struct snd_soc_dai_ops wm8770_dai_ops = { +static const struct snd_soc_dai_ops wm8770_dai_ops = { .digital_mute = wm8770_mute, .hw_params = wm8770_hw_params, .set_fmt = wm8770_set_fmt, diff --git a/sound/soc/codecs/wm8776.c b/sound/soc/codecs/wm8776.c index f967c59d..223fc5a 100644 --- a/sound/soc/codecs/wm8776.c +++ b/sound/soc/codecs/wm8776.c @@ -327,14 +327,14 @@ static int wm8776_set_bias_level(struct snd_soc_codec *codec, #define WM8776_FORMATS (SNDRV_PCM_FMTBIT_S16_LE | SNDRV_PCM_FMTBIT_S20_3LE |\ SNDRV_PCM_FMTBIT_S24_LE | SNDRV_PCM_FMTBIT_S32_LE) -static struct snd_soc_dai_ops wm8776_dac_ops = { +static const struct snd_soc_dai_ops wm8776_dac_ops = { .digital_mute = wm8776_mute, .hw_params = wm8776_hw_params, .set_fmt = wm8776_set_fmt, .set_sysclk = wm8776_set_sysclk, }; -static struct snd_soc_dai_ops wm8776_adc_ops = { +static const struct snd_soc_dai_ops wm8776_adc_ops = { .hw_params = wm8776_hw_params, .set_fmt = wm8776_set_fmt, .set_sysclk = wm8776_set_sysclk, diff --git a/sound/soc/codecs/wm8804.c b/sound/soc/codecs/wm8804.c index 9ee072b..d99c6a0 100644 --- a/sound/soc/codecs/wm8804.c +++ b/sound/soc/codecs/wm8804.c @@ -670,7 +670,7 @@ err_reg_get: return ret; } -static struct snd_soc_dai_ops wm8804_dai_ops = { +static const struct snd_soc_dai_ops wm8804_dai_ops = { .hw_params = wm8804_hw_params, .set_fmt = wm8804_set_fmt, .set_sysclk = wm8804_set_sysclk, diff --git a/sound/soc/codecs/wm8900.c b/sound/soc/codecs/wm8900.c index 17a12c2..a430930 100644 --- a/sound/soc/codecs/wm8900.c +++ b/sound/soc/codecs/wm8900.c @@ -987,7 +987,7 @@ static int wm8900_digital_mute(struct snd_soc_dai *codec_dai, int mute) (SNDRV_PCM_FORMAT_S16_LE | SNDRV_PCM_FORMAT_S20_3LE | \ SNDRV_PCM_FORMAT_S24_LE) -static struct snd_soc_dai_ops wm8900_dai_ops = { +static const struct snd_soc_dai_ops wm8900_dai_ops = { .hw_params = wm8900_hw_params, .set_clkdiv = wm8900_set_dai_clkdiv, .set_pll = wm8900_set_dai_pll, diff --git a/sound/soc/codecs/wm8903.c b/sound/soc/codecs/wm8903.c index 4ad8ebd..812dce9 100644 --- a/sound/soc/codecs/wm8903.c +++ b/sound/soc/codecs/wm8903.c @@ -1732,7 +1732,7 @@ static irqreturn_t wm8903_irq(int irq, void *data) SNDRV_PCM_FMTBIT_S20_3LE |\ SNDRV_PCM_FMTBIT_S24_LE) -static struct snd_soc_dai_ops wm8903_dai_ops = { +static const struct snd_soc_dai_ops wm8903_dai_ops = { .hw_params = wm8903_hw_params, .digital_mute = wm8903_digital_mute, .set_fmt = wm8903_set_dai_fmt, diff --git a/sound/soc/codecs/wm8904.c b/sound/soc/codecs/wm8904.c index bb070f83..f0b0c7a 100644 --- a/sound/soc/codecs/wm8904.c +++ b/sound/soc/codecs/wm8904.c @@ -2205,7 +2205,7 @@ static int wm8904_set_bias_level(struct snd_soc_codec *codec, #define WM8904_FORMATS (SNDRV_PCM_FMTBIT_S16_LE | SNDRV_PCM_FMTBIT_S20_3LE |\ SNDRV_PCM_FMTBIT_S24_LE | SNDRV_PCM_FMTBIT_S32_LE) -static struct snd_soc_dai_ops wm8904_dai_ops = { +static const struct snd_soc_dai_ops wm8904_dai_ops = { .set_sysclk = wm8904_set_sysclk, .set_fmt = wm8904_set_fmt, .set_tdm_slot = wm8904_set_tdm_slot, diff --git a/sound/soc/codecs/wm8940.c b/sound/soc/codecs/wm8940.c index 1b5856b..0dd1e0c 100644 --- a/sound/soc/codecs/wm8940.c +++ b/sound/soc/codecs/wm8940.c @@ -644,7 +644,7 @@ static int wm8940_set_dai_clkdiv(struct snd_soc_dai *codec_dai, SNDRV_PCM_FMTBIT_S24_LE | \ SNDRV_PCM_FMTBIT_S32_LE) -static struct snd_soc_dai_ops wm8940_dai_ops = { +static const struct snd_soc_dai_ops wm8940_dai_ops = { .hw_params = wm8940_i2s_hw_params, .set_sysclk = wm8940_set_dai_sysclk, .digital_mute = wm8940_mute, diff --git a/sound/soc/codecs/wm8955.c b/sound/soc/codecs/wm8955.c index 3c71987..dbf2a83 100644 --- a/sound/soc/codecs/wm8955.c +++ b/sound/soc/codecs/wm8955.c @@ -859,7 +859,7 @@ static int wm8955_set_bias_level(struct snd_soc_codec *codec, #define WM8955_FORMATS (SNDRV_PCM_FMTBIT_S16_LE | SNDRV_PCM_FMTBIT_S20_3LE |\ SNDRV_PCM_FMTBIT_S24_LE | SNDRV_PCM_FMTBIT_S32_LE) -static struct snd_soc_dai_ops wm8955_dai_ops = { +static const struct snd_soc_dai_ops wm8955_dai_ops = { .set_sysclk = wm8955_set_sysclk, .set_fmt = wm8955_set_fmt, .hw_params = wm8955_hw_params, diff --git a/sound/soc/codecs/wm8960.c b/sound/soc/codecs/wm8960.c index 6e22f9b..06dca88 100644 --- a/sound/soc/codecs/wm8960.c +++ b/sound/soc/codecs/wm8960.c @@ -869,7 +869,7 @@ static int wm8960_set_bias_level(struct snd_soc_codec *codec, (SNDRV_PCM_FMTBIT_S16_LE | SNDRV_PCM_FMTBIT_S20_3LE | \ SNDRV_PCM_FMTBIT_S24_LE) -static struct snd_soc_dai_ops wm8960_dai_ops = { +static const struct snd_soc_dai_ops wm8960_dai_ops = { .hw_params = wm8960_hw_params, .digital_mute = wm8960_mute, .set_fmt = wm8960_set_dai_fmt, diff --git a/sound/soc/codecs/wm8961.c b/sound/soc/codecs/wm8961.c index 7f2df7b..783a3d1 100644 --- a/sound/soc/codecs/wm8961.c +++ b/sound/soc/codecs/wm8961.c @@ -929,7 +929,7 @@ static int wm8961_set_bias_level(struct snd_soc_codec *codec, (SNDRV_PCM_FMTBIT_S16_LE | SNDRV_PCM_FMTBIT_S20_3LE | \ SNDRV_PCM_FMTBIT_S24_LE) -static struct snd_soc_dai_ops wm8961_dai_ops = { +static const struct snd_soc_dai_ops wm8961_dai_ops = { .hw_params = wm8961_hw_params, .set_sysclk = wm8961_set_sysclk, .set_fmt = wm8961_set_fmt, diff --git a/sound/soc/codecs/wm8962.c b/sound/soc/codecs/wm8962.c index 48b5c95..555311d 100644 --- a/sound/soc/codecs/wm8962.c +++ b/sound/soc/codecs/wm8962.c @@ -3503,7 +3503,7 @@ static int wm8962_mute(struct snd_soc_dai *dai, int mute) #define WM8962_FORMATS (SNDRV_PCM_FMTBIT_S16_LE | SNDRV_PCM_FMTBIT_S20_3LE |\ SNDRV_PCM_FMTBIT_S24_LE | SNDRV_PCM_FMTBIT_S32_LE) -static struct snd_soc_dai_ops wm8962_dai_ops = { +static const struct snd_soc_dai_ops wm8962_dai_ops = { .hw_params = wm8962_hw_params, .set_sysclk = wm8962_set_dai_sysclk, .set_fmt = wm8962_set_dai_fmt, diff --git a/sound/soc/codecs/wm8971.c b/sound/soc/codecs/wm8971.c index 3a06a95..98bfbdd 100644 --- a/sound/soc/codecs/wm8971.c +++ b/sound/soc/codecs/wm8971.c @@ -567,7 +567,7 @@ static int wm8971_set_bias_level(struct snd_soc_codec *codec, #define WM8971_FORMATS (SNDRV_PCM_FMTBIT_S16_LE | SNDRV_PCM_FMTBIT_S20_3LE |\ SNDRV_PCM_FMTBIT_S24_LE) -static struct snd_soc_dai_ops wm8971_dai_ops = { +static const struct snd_soc_dai_ops wm8971_dai_ops = { .hw_params = wm8971_pcm_hw_params, .digital_mute = wm8971_mute, .set_fmt = wm8971_set_dai_fmt, diff --git a/sound/soc/codecs/wm8974.c b/sound/soc/codecs/wm8974.c index 7bd35b8..16569c7 100644 --- a/sound/soc/codecs/wm8974.c +++ b/sound/soc/codecs/wm8974.c @@ -557,7 +557,7 @@ static int wm8974_set_bias_level(struct snd_soc_codec *codec, #define WM8974_FORMATS (SNDRV_PCM_FMTBIT_S16_LE | SNDRV_PCM_FMTBIT_S20_3LE |\ SNDRV_PCM_FMTBIT_S24_LE) -static struct snd_soc_dai_ops wm8974_ops = { +static const struct snd_soc_dai_ops wm8974_ops = { .hw_params = wm8974_pcm_hw_params, .digital_mute = wm8974_mute, .set_fmt = wm8974_set_dai_fmt, diff --git a/sound/soc/codecs/wm8978.c b/sound/soc/codecs/wm8978.c index 41ca4d9..517bb22 100644 --- a/sound/soc/codecs/wm8978.c +++ b/sound/soc/codecs/wm8978.c @@ -865,7 +865,7 @@ static int wm8978_set_bias_level(struct snd_soc_codec *codec, #define WM8978_FORMATS (SNDRV_PCM_FMTBIT_S16_LE | SNDRV_PCM_FMTBIT_S20_3LE | \ SNDRV_PCM_FMTBIT_S24_LE | SNDRV_PCM_FMTBIT_S32_LE) -static struct snd_soc_dai_ops wm8978_dai_ops = { +static const struct snd_soc_dai_ops wm8978_dai_ops = { .hw_params = wm8978_hw_params, .digital_mute = wm8978_mute, .set_fmt = wm8978_set_dai_fmt, diff --git a/sound/soc/codecs/wm8983.c b/sound/soc/codecs/wm8983.c index 58e067b..362298c 100644 --- a/sound/soc/codecs/wm8983.c +++ b/sound/soc/codecs/wm8983.c @@ -1035,7 +1035,7 @@ static int wm8983_probe(struct snd_soc_codec *codec) return 0; } -static struct snd_soc_dai_ops wm8983_dai_ops = { +static const struct snd_soc_dai_ops wm8983_dai_ops = { .digital_mute = wm8983_dac_mute, .hw_params = wm8983_hw_params, .set_fmt = wm8983_set_fmt, diff --git a/sound/soc/codecs/wm8985.c b/sound/soc/codecs/wm8985.c index 36c4ee0..9e4481b 100644 --- a/sound/soc/codecs/wm8985.c +++ b/sound/soc/codecs/wm8985.c @@ -1031,7 +1031,7 @@ err_reg_get: return ret; } -static struct snd_soc_dai_ops wm8985_dai_ops = { +static const struct snd_soc_dai_ops wm8985_dai_ops = { .digital_mute = wm8985_dac_mute, .hw_params = wm8985_hw_params, .set_fmt = wm8985_set_fmt, diff --git a/sound/soc/codecs/wm8988.c b/sound/soc/codecs/wm8988.c index 514189d..9d83bed5 100644 --- a/sound/soc/codecs/wm8988.c +++ b/sound/soc/codecs/wm8988.c @@ -701,7 +701,7 @@ static int wm8988_set_bias_level(struct snd_soc_codec *codec, #define WM8988_FORMATS (SNDRV_PCM_FMTBIT_S16_LE | SNDRV_PCM_FMTBIT_S20_3LE |\ SNDRV_PCM_FMTBIT_S24_LE) -static struct snd_soc_dai_ops wm8988_ops = { +static const struct snd_soc_dai_ops wm8988_ops = { .startup = wm8988_pcm_startup, .hw_params = wm8988_pcm_hw_params, .set_fmt = wm8988_set_dai_fmt, diff --git a/sound/soc/codecs/wm8990.c b/sound/soc/codecs/wm8990.c index d4cbec6..61c620e 100644 --- a/sound/soc/codecs/wm8990.c +++ b/sound/soc/codecs/wm8990.c @@ -1287,7 +1287,7 @@ static int wm8990_set_bias_level(struct snd_soc_codec *codec, * 1. ADC/DAC on Primary Interface * 2. ADC on Primary Interface/DAC on secondary */ -static struct snd_soc_dai_ops wm8990_dai_ops = { +static const struct snd_soc_dai_ops wm8990_dai_ops = { .hw_params = wm8990_hw_params, .digital_mute = wm8990_mute, .set_fmt = wm8990_set_dai_fmt, diff --git a/sound/soc/codecs/wm8991.c b/sound/soc/codecs/wm8991.c index 1d46d59..ac957ec 100644 --- a/sound/soc/codecs/wm8991.c +++ b/sound/soc/codecs/wm8991.c @@ -1311,7 +1311,7 @@ static int wm8991_probe(struct snd_soc_codec *codec) #define WM8991_FORMATS (SNDRV_PCM_FMTBIT_S16_LE | SNDRV_PCM_FMTBIT_S20_3LE |\ SNDRV_PCM_FMTBIT_S24_LE) -static struct snd_soc_dai_ops wm8991_ops = { +static const struct snd_soc_dai_ops wm8991_ops = { .hw_params = wm8991_hw_params, .digital_mute = wm8991_mute, .set_fmt = wm8991_set_dai_fmt, diff --git a/sound/soc/codecs/wm8993.c b/sound/soc/codecs/wm8993.c index d1a142f4..780c24c 100644 --- a/sound/soc/codecs/wm8993.c +++ b/sound/soc/codecs/wm8993.c @@ -1394,7 +1394,7 @@ out: return 0; } -static struct snd_soc_dai_ops wm8993_ops = { +static const struct snd_soc_dai_ops wm8993_ops = { .set_sysclk = wm8993_set_sysclk, .set_fmt = wm8993_set_dai_fmt, .hw_params = wm8993_hw_params, diff --git a/sound/soc/codecs/wm8994.c b/sound/soc/codecs/wm8994.c index 9c982e4..73db980 100644 --- a/sound/soc/codecs/wm8994.c +++ b/sound/soc/codecs/wm8994.c @@ -2531,7 +2531,7 @@ static int wm8994_aif2_probe(struct snd_soc_dai *dai) #define WM8994_FORMATS (SNDRV_PCM_FMTBIT_S16_LE | SNDRV_PCM_FMTBIT_S20_3LE |\ SNDRV_PCM_FMTBIT_S24_LE | SNDRV_PCM_FMTBIT_S32_LE) -static struct snd_soc_dai_ops wm8994_aif1_dai_ops = { +static const struct snd_soc_dai_ops wm8994_aif1_dai_ops = { .set_sysclk = wm8994_set_dai_sysclk, .set_fmt = wm8994_set_dai_fmt, .hw_params = wm8994_hw_params, @@ -2541,7 +2541,7 @@ static struct snd_soc_dai_ops wm8994_aif1_dai_ops = { .set_tristate = wm8994_set_tristate, }; -static struct snd_soc_dai_ops wm8994_aif2_dai_ops = { +static const struct snd_soc_dai_ops wm8994_aif2_dai_ops = { .set_sysclk = wm8994_set_dai_sysclk, .set_fmt = wm8994_set_dai_fmt, .hw_params = wm8994_hw_params, @@ -2551,7 +2551,7 @@ static struct snd_soc_dai_ops wm8994_aif2_dai_ops = { .set_tristate = wm8994_set_tristate, }; -static struct snd_soc_dai_ops wm8994_aif3_dai_ops = { +static const struct snd_soc_dai_ops wm8994_aif3_dai_ops = { .hw_params = wm8994_aif3_hw_params, .set_tristate = wm8994_set_tristate, }; diff --git a/sound/soc/codecs/wm8995.c b/sound/soc/codecs/wm8995.c index 3774acb..8f6a36d 100644 --- a/sound/soc/codecs/wm8995.c +++ b/sound/soc/codecs/wm8995.c @@ -2155,7 +2155,7 @@ err_reg_get: #define WM8995_FORMATS (SNDRV_PCM_FMTBIT_S16_LE | SNDRV_PCM_FMTBIT_S20_3LE |\ SNDRV_PCM_FMTBIT_S24_LE | SNDRV_PCM_FMTBIT_S32_LE) -static struct snd_soc_dai_ops wm8995_aif1_dai_ops = { +static const struct snd_soc_dai_ops wm8995_aif1_dai_ops = { .set_sysclk = wm8995_set_dai_sysclk, .set_fmt = wm8995_set_dai_fmt, .hw_params = wm8995_hw_params, @@ -2164,7 +2164,7 @@ static struct snd_soc_dai_ops wm8995_aif1_dai_ops = { .set_tristate = wm8995_set_tristate, }; -static struct snd_soc_dai_ops wm8995_aif2_dai_ops = { +static const struct snd_soc_dai_ops wm8995_aif2_dai_ops = { .set_sysclk = wm8995_set_dai_sysclk, .set_fmt = wm8995_set_dai_fmt, .hw_params = wm8995_hw_params, @@ -2173,7 +2173,7 @@ static struct snd_soc_dai_ops wm8995_aif2_dai_ops = { .set_tristate = wm8995_set_tristate, }; -static struct snd_soc_dai_ops wm8995_aif3_dai_ops = { +static const struct snd_soc_dai_ops wm8995_aif3_dai_ops = { .set_tristate = wm8995_set_tristate, }; diff --git a/sound/soc/codecs/wm8996.c b/sound/soc/codecs/wm8996.c index fd5bb1a..304a0e57 100644 --- a/sound/soc/codecs/wm8996.c +++ b/sound/soc/codecs/wm8996.c @@ -3052,7 +3052,7 @@ static struct snd_soc_codec_driver soc_codec_dev_wm8996 = { SNDRV_PCM_FMTBIT_S20_3LE | SNDRV_PCM_FMTBIT_S24_LE |\ SNDRV_PCM_FMTBIT_S32_LE) -static struct snd_soc_dai_ops wm8996_dai_ops = { +static const struct snd_soc_dai_ops wm8996_dai_ops = { .set_fmt = wm8996_set_fmt, .hw_params = wm8996_hw_params, .set_sysclk = wm8996_set_sysclk, diff --git a/sound/soc/codecs/wm9081.c b/sound/soc/codecs/wm9081.c index f7c0738..48bf80b 100644 --- a/sound/soc/codecs/wm9081.c +++ b/sound/soc/codecs/wm9081.c @@ -1234,7 +1234,7 @@ static int wm9081_set_tdm_slot(struct snd_soc_dai *dai, (SNDRV_PCM_FMTBIT_S16_LE | SNDRV_PCM_FMTBIT_S20_3LE | \ SNDRV_PCM_FMTBIT_S24_LE | SNDRV_PCM_FMTBIT_S32_LE) -static struct snd_soc_dai_ops wm9081_dai_ops = { +static const struct snd_soc_dai_ops wm9081_dai_ops = { .hw_params = wm9081_hw_params, .set_fmt = wm9081_set_dai_fmt, .digital_mute = wm9081_digital_mute, diff --git a/sound/soc/codecs/wm9705.c b/sound/soc/codecs/wm9705.c index 646b58d..edf6032 100644 --- a/sound/soc/codecs/wm9705.c +++ b/sound/soc/codecs/wm9705.c @@ -258,7 +258,7 @@ static int ac97_prepare(struct snd_pcm_substream *substream, SNDRV_PCM_RATE_32000 | SNDRV_PCM_RATE_44100 | \ SNDRV_PCM_RATE_48000) -static struct snd_soc_dai_ops wm9705_dai_ops = { +static const struct snd_soc_dai_ops wm9705_dai_ops = { .prepare = ac97_prepare, }; diff --git a/sound/soc/codecs/wm9712.c b/sound/soc/codecs/wm9712.c index 90117f8..fd18127 100644 --- a/sound/soc/codecs/wm9712.c +++ b/sound/soc/codecs/wm9712.c @@ -505,11 +505,11 @@ static int ac97_aux_prepare(struct snd_pcm_substream *substream, SNDRV_PCM_RATE_22050 | SNDRV_PCM_RATE_44100 |\ SNDRV_PCM_RATE_48000) -static struct snd_soc_dai_ops wm9712_dai_ops_hifi = { +static const struct snd_soc_dai_ops wm9712_dai_ops_hifi = { .prepare = ac97_prepare, }; -static struct snd_soc_dai_ops wm9712_dai_ops_aux = { +static const struct snd_soc_dai_ops wm9712_dai_ops_aux = { .prepare = ac97_aux_prepare, }; diff --git a/sound/soc/codecs/wm9713.c b/sound/soc/codecs/wm9713.c index 7167cb6..09360b6 100644 --- a/sound/soc/codecs/wm9713.c +++ b/sound/soc/codecs/wm9713.c @@ -1026,19 +1026,19 @@ static int ac97_aux_prepare(struct snd_pcm_substream *substream, (SNDRV_PCM_FORMAT_S16_LE | SNDRV_PCM_FORMAT_S20_3LE | \ SNDRV_PCM_FORMAT_S24_LE) -static struct snd_soc_dai_ops wm9713_dai_ops_hifi = { +static const struct snd_soc_dai_ops wm9713_dai_ops_hifi = { .prepare = ac97_hifi_prepare, .set_clkdiv = wm9713_set_dai_clkdiv, .set_pll = wm9713_set_dai_pll, }; -static struct snd_soc_dai_ops wm9713_dai_ops_aux = { +static const struct snd_soc_dai_ops wm9713_dai_ops_aux = { .prepare = ac97_aux_prepare, .set_clkdiv = wm9713_set_dai_clkdiv, .set_pll = wm9713_set_dai_pll, }; -static struct snd_soc_dai_ops wm9713_dai_ops_voice = { +static const struct snd_soc_dai_ops wm9713_dai_ops_voice = { .hw_params = wm9713_pcm_hw_params, .set_clkdiv = wm9713_set_dai_clkdiv, .set_pll = wm9713_set_dai_pll, |