diff options
author | Javier Carrasco <javier.carrasco.cruz@gmail.com> | 2024-07-29 12:37:37 +0300 |
---|---|---|
committer | Hans Verkuil <hverkuil-cisco@xs4all.nl> | 2024-08-09 08:56:38 +0300 |
commit | 447b7fdba9e9497f27b845ec069300c91ed5d625 (patch) | |
tree | efa7c8046db115c52b0dadaa955fd147c3537294 /drivers/media/i2c | |
parent | c8ad75010c5bafe014860f33fc73a887ab561209 (diff) | |
download | linux-447b7fdba9e9497f27b845ec069300c91ed5d625.tar.xz |
media: i2c: tda1997x: constify snd_soc_component_driver struct
`tda1997x_codec_driver` is not modified after its declaration, and it
is only passed to `devm_snd_soc_register_component()`, which expects
a constant `snd_soc_component_driver`.
Move `tda1997x_codec_driver` to a read-only section by declaring it
const.
Signed-off-by: Javier Carrasco <javier.carrasco.cruz@gmail.com>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Diffstat (limited to 'drivers/media/i2c')
-rw-r--r-- | drivers/media/i2c/tda1997x.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/media/i2c/tda1997x.c b/drivers/media/i2c/tda1997x.c index 58ce8fec3041..3b7e5ff5b010 100644 --- a/drivers/media/i2c/tda1997x.c +++ b/drivers/media/i2c/tda1997x.c @@ -2514,7 +2514,7 @@ static void tda1997x_codec_remove(struct snd_soc_component *component) { } -static struct snd_soc_component_driver tda1997x_codec_driver = { +static const struct snd_soc_component_driver tda1997x_codec_driver = { .probe = tda1997x_codec_probe, .remove = tda1997x_codec_remove, .idle_bias_on = 1, |