aboutsummaryrefslogtreecommitdiffstats
path: root/sound/soc/blackfin
diff options
context:
space:
mode:
authorLars-Peter Clausen <lars@metafoo.de>2011-11-23 05:40:40 -0500
committerMark Brown <broonie@opensource.wolfsonmicro.com>2011-11-23 05:40:46 -0500
commit85e7652d89293a6dab42bfd31f276f8bc072d4c5 (patch)
tree648de4f4e055ccd0c687184c3fc56e4f56bc3e16 /sound/soc/blackfin
parentbea0ed0825be288f9fc98696fc476066776b26be (diff)
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/blackfin')
-rw-r--r--sound/soc/blackfin/bf5xx-i2s.c2
-rw-r--r--sound/soc/blackfin/bf5xx-tdm.c2
2 files changed, 2 insertions, 2 deletions
diff --git a/sound/soc/blackfin/bf5xx-i2s.c b/sound/soc/blackfin/bf5xx-i2s.c
index 00cc3e00b2fe..b31662e3a428 100644
--- a/sound/soc/blackfin/bf5xx-i2s.c
+++ b/sound/soc/blackfin/bf5xx-i2s.c
@@ -223,7 +223,7 @@ static int bf5xx_i2s_resume(struct snd_soc_dai *dai)
223 SNDRV_PCM_FMTBIT_S24_LE | \ 223 SNDRV_PCM_FMTBIT_S24_LE | \
224 SNDRV_PCM_FMTBIT_S32_LE) 224 SNDRV_PCM_FMTBIT_S32_LE)
225 225
226static struct snd_soc_dai_ops bf5xx_i2s_dai_ops = { 226static const struct snd_soc_dai_ops bf5xx_i2s_dai_ops = {
227 .shutdown = bf5xx_i2s_shutdown, 227 .shutdown = bf5xx_i2s_shutdown,
228 .hw_params = bf5xx_i2s_hw_params, 228 .hw_params = bf5xx_i2s_hw_params,
229 .set_fmt = bf5xx_i2s_set_dai_fmt, 229 .set_fmt = bf5xx_i2s_set_dai_fmt,
diff --git a/sound/soc/blackfin/bf5xx-tdm.c b/sound/soc/blackfin/bf5xx-tdm.c
index a822d1ee1380..7876b5090fda 100644
--- a/sound/soc/blackfin/bf5xx-tdm.c
+++ b/sound/soc/blackfin/bf5xx-tdm.c
@@ -226,7 +226,7 @@ static int bf5xx_tdm_resume(struct snd_soc_dai *dai)
226#define bf5xx_tdm_resume NULL 226#define bf5xx_tdm_resume NULL
227#endif 227#endif
228 228
229static struct snd_soc_dai_ops bf5xx_tdm_dai_ops = { 229static const struct snd_soc_dai_ops bf5xx_tdm_dai_ops = {
230 .hw_params = bf5xx_tdm_hw_params, 230 .hw_params = bf5xx_tdm_hw_params,
231 .set_fmt = bf5xx_tdm_set_dai_fmt, 231 .set_fmt = bf5xx_tdm_set_dai_fmt,
232 .shutdown = bf5xx_tdm_shutdown, 232 .shutdown = bf5xx_tdm_shutdown,