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/davinci/davinci-i2s.c | 2 +- sound/soc/davinci/davinci-mcasp.c | 2 +- sound/soc/davinci/davinci-vcif.c | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) (limited to 'sound/soc/davinci') diff --git a/sound/soc/davinci/davinci-i2s.c b/sound/soc/davinci/davinci-i2s.c index 300e12118c00..f3d5ae1078be 100644 --- a/sound/soc/davinci/davinci-i2s.c +++ b/sound/soc/davinci/davinci-i2s.c @@ -620,7 +620,7 @@ static void davinci_i2s_shutdown(struct snd_pcm_substream *substream, #define DAVINCI_I2S_RATES SNDRV_PCM_RATE_8000_96000 -static struct snd_soc_dai_ops davinci_i2s_dai_ops = { +static const struct snd_soc_dai_ops davinci_i2s_dai_ops = { .startup = davinci_i2s_startup, .shutdown = davinci_i2s_shutdown, .prepare = davinci_i2s_prepare, diff --git a/sound/soc/davinci/davinci-mcasp.c b/sound/soc/davinci/davinci-mcasp.c index 7173df254a91..03cea9d39c4b 100644 --- a/sound/soc/davinci/davinci-mcasp.c +++ b/sound/soc/davinci/davinci-mcasp.c @@ -813,7 +813,7 @@ static int davinci_mcasp_startup(struct snd_pcm_substream *substream, return 0; } -static struct snd_soc_dai_ops davinci_mcasp_dai_ops = { +static const struct snd_soc_dai_ops davinci_mcasp_dai_ops = { .startup = davinci_mcasp_startup, .trigger = davinci_mcasp_trigger, .hw_params = davinci_mcasp_hw_params, diff --git a/sound/soc/davinci/davinci-vcif.c b/sound/soc/davinci/davinci-vcif.c index 1f11525d97e8..dae96b85fd6d 100644 --- a/sound/soc/davinci/davinci-vcif.c +++ b/sound/soc/davinci/davinci-vcif.c @@ -183,7 +183,7 @@ static int davinci_vcif_startup(struct snd_pcm_substream *substream, #define DAVINCI_VCIF_RATES SNDRV_PCM_RATE_8000_48000 -static struct snd_soc_dai_ops davinci_vcif_dai_ops = { +static const struct snd_soc_dai_ops davinci_vcif_dai_ops = { .startup = davinci_vcif_startup, .trigger = davinci_vcif_trigger, .hw_params = davinci_vcif_hw_params, -- cgit v1.2.3