From 85e7652d89293a6dab42bfd31f276f8bc072d4c5 Mon Sep 17 00:00:00 2001 From: Lars-Peter Clausen Date: Wed, 23 Nov 2011 11:40:40 +0100 Subject: 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: // @@ identifier ops; @@ -struct snd_soc_dai_ops ops = +const struct snd_soc_dai_ops ops = { ... }; // Signed-off-by: Lars-Peter Clausen Signed-off-by: Mark Brown --- sound/soc/au1x/ac97c.c | 2 +- sound/soc/au1x/i2sc.c | 2 +- sound/soc/au1x/psc-ac97.c | 2 +- sound/soc/au1x/psc-i2s.c | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) (limited to 'sound/soc/au1x') diff --git a/sound/soc/au1x/ac97c.c b/sound/soc/au1x/ac97c.c index 726bd651a105..7771934b93e2 100644 --- a/sound/soc/au1x/ac97c.c +++ b/sound/soc/au1x/ac97c.c @@ -195,7 +195,7 @@ static int alchemy_ac97c_startup(struct snd_pcm_substream *substream, return 0; } -static struct snd_soc_dai_ops alchemy_ac97c_ops = { +static const struct snd_soc_dai_ops alchemy_ac97c_ops = { .startup = alchemy_ac97c_startup, }; diff --git a/sound/soc/au1x/i2sc.c b/sound/soc/au1x/i2sc.c index 6bcf48f5884c..2d5f755ac99c 100644 --- a/sound/soc/au1x/i2sc.c +++ b/sound/soc/au1x/i2sc.c @@ -201,7 +201,7 @@ static int au1xi2s_startup(struct snd_pcm_substream *substream, return 0; } -static const struct snd_soc_dai_ops au1xi2s_dai_ops = { +static const const struct snd_soc_dai_ops au1xi2s_dai_ops = { .startup = au1xi2s_startup, .trigger = au1xi2s_trigger, .hw_params = au1xi2s_hw_params, diff --git a/sound/soc/au1x/psc-ac97.c b/sound/soc/au1x/psc-ac97.c index 0c6acd547141..87daf456b1c9 100644 --- a/sound/soc/au1x/psc-ac97.c +++ b/sound/soc/au1x/psc-ac97.c @@ -337,7 +337,7 @@ static int au1xpsc_ac97_probe(struct snd_soc_dai *dai) return au1xpsc_ac97_workdata ? 0 : -ENODEV; } -static struct snd_soc_dai_ops au1xpsc_ac97_dai_ops = { +static const struct snd_soc_dai_ops au1xpsc_ac97_dai_ops = { .startup = au1xpsc_ac97_startup, .trigger = au1xpsc_ac97_trigger, .hw_params = au1xpsc_ac97_hw_params, diff --git a/sound/soc/au1x/psc-i2s.c b/sound/soc/au1x/psc-i2s.c index e03c5ce01b30..f7714d50bdaf 100644 --- a/sound/soc/au1x/psc-i2s.c +++ b/sound/soc/au1x/psc-i2s.c @@ -265,7 +265,7 @@ static int au1xpsc_i2s_startup(struct snd_pcm_substream *substream, return 0; } -static struct snd_soc_dai_ops au1xpsc_i2s_dai_ops = { +static const struct snd_soc_dai_ops au1xpsc_i2s_dai_ops = { .startup = au1xpsc_i2s_startup, .trigger = au1xpsc_i2s_trigger, .hw_params = au1xpsc_i2s_hw_params, -- cgit v1.2.3-59-g8ed1b