Commit 6e37f933 authored by Bhumika Goyal's avatar Bhumika Goyal Committed by Mark Brown

ASoC: codecs: make snd_soc_dai_driver and snd_soc_component_driver const

Make these two structure variables const as they are either used in a
copy operation or passed to devm_snd_soc_register_component having the
corresponding argument as const.
Done using Coccinelle.
Signed-off-by: default avatarBhumika Goyal <bhumirks@gmail.com>
Signed-off-by: default avatarMark Brown <broonie@kernel.org>
parent 0ed6f157
...@@ -692,7 +692,7 @@ static int hdmi_codec_pcm_new(struct snd_soc_pcm_runtime *rtd, ...@@ -692,7 +692,7 @@ static int hdmi_codec_pcm_new(struct snd_soc_pcm_runtime *rtd,
return snd_ctl_add(rtd->card->snd_card, kctl); return snd_ctl_add(rtd->card->snd_card, kctl);
} }
static struct snd_soc_dai_driver hdmi_i2s_dai = { static const struct snd_soc_dai_driver hdmi_i2s_dai = {
.name = "i2s-hifi", .name = "i2s-hifi",
.id = DAI_ID_I2S, .id = DAI_ID_I2S,
.playback = { .playback = {
......
...@@ -100,7 +100,7 @@ static const struct snd_soc_dapm_route lm4857_routes[] = { ...@@ -100,7 +100,7 @@ static const struct snd_soc_dapm_route lm4857_routes[] = {
{ "EP", "Earpiece", "Mode" }, { "EP", "Earpiece", "Mode" },
}; };
static struct snd_soc_component_driver lm4857_component_driver = { static const struct snd_soc_component_driver lm4857_component_driver = {
.controls = lm4857_controls, .controls = lm4857_controls,
.num_controls = ARRAY_SIZE(lm4857_controls), .num_controls = ARRAY_SIZE(lm4857_controls),
.dapm_widgets = lm4857_dapm_widgets, .dapm_widgets = lm4857_dapm_widgets,
......
...@@ -151,7 +151,7 @@ static int max9768_probe(struct snd_soc_component *component) ...@@ -151,7 +151,7 @@ static int max9768_probe(struct snd_soc_component *component)
return 0; return 0;
} }
static struct snd_soc_component_driver max9768_component_driver = { static const struct snd_soc_component_driver max9768_component_driver = {
.probe = max9768_probe, .probe = max9768_probe,
.controls = max9768_volume, .controls = max9768_volume,
.num_controls = ARRAY_SIZE(max9768_volume), .num_controls = ARRAY_SIZE(max9768_volume),
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment