diff options
| author | Javier Carrasco <javier.carrasco.cruz@gmail.com> | 2024-07-29 11:37:38 +0200 |
|---|---|---|
| committer | Mark Brown <broonie@kernel.org> | 2024-09-30 01:10:48 +0200 |
| commit | 8adff2ff73d8271c993549b106b26f301fa003cf (patch) | |
| tree | 96e67672a96b4537d4ca7db2491fedc1281b6a32 /sound/soc/codecs/cpcap.c | |
| parent | 46f2dd5ce5723a2c07051d332f8f1c4c4ce548f3 (diff) | |
| download | linux-next-8adff2ff73d8271c993549b106b26f301fa003cf.tar.gz linux-next-8adff2ff73d8271c993549b106b26f301fa003cf.zip | |
ASoC: constify snd_soc_component_driver struct
Declare `snd_soc_component_driver` as const to move it to a read-only
section for the drivers that do not modify the struct after its
declaration.
The affected drivers only pass this struct to
`devm_snd_soc_register_component()`, whose argument is const and
therefore does not modify the content of the struct.
Signed-off-by: Javier Carrasco <javier.carrasco.cruz@gmail.com>
Link: https://patch.msgid.link/20240729-const_snd_soc_component_driver-v2-2-1994f44f1ec2@gmail.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'sound/soc/codecs/cpcap.c')
| -rw-r--r-- | sound/soc/codecs/cpcap.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/sound/soc/codecs/cpcap.c b/sound/soc/codecs/cpcap.c index 4f9dabd9d78a..04304a7ad915 100644 --- a/sound/soc/codecs/cpcap.c +++ b/sound/soc/codecs/cpcap.c @@ -1649,7 +1649,7 @@ static int cpcap_soc_probe(struct snd_soc_component *component) return cpcap_audio_reset(component, false); } -static struct snd_soc_component_driver soc_codec_dev_cpcap = { +static const struct snd_soc_component_driver soc_codec_dev_cpcap = { .probe = cpcap_soc_probe, .controls = cpcap_snd_controls, .num_controls = ARRAY_SIZE(cpcap_snd_controls), |
