From: Javier Carrasco Date: Mon, 29 Jul 2024 09:37:37 +0000 (+0200) Subject: media: i2c: tda1997x: constify snd_soc_component_driver struct X-Git-Tag: v6.12-rc1~82^2~124 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=447b7fdba9e9497f27b845ec069300c91ed5d625;p=thirdparty%2Fkernel%2Fstable.git 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 Signed-off-by: Hans Verkuil --- diff --git a/drivers/media/i2c/tda1997x.c b/drivers/media/i2c/tda1997x.c index 58ce8fec3041a..3b7e5ff5b010b 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,