Declare `snd_soc_component_driver` as const to move their declarations to read-only sections for the drivers that do not modify the struct after its declaration.
Apart from a single case under media/, the affected drivers are members of the ASoC subsystem.
To: Tim Harvey tharvey@gateworks.com To: Mauro Carvalho Chehab mchehab@kernel.org To: Liam Girdwood lgirdwood@gmail.com To: Mark Brown broonie@kernel.org To: Jaroslav Kysela perex@perex.cz To: Takashi Iwai tiwai@suse.com To: Ray Jui rjui@broadcom.com To: Scott Branden sbranden@broadcom.com To: Broadcom internal kernel review list bcm-kernel-feedback-list@broadcom.com To: Shenghao Ding shenghao-ding@ti.com To: Kevin Lu kevin-lu@ti.com To: Baojun Xu baojun.xu@ti.com To: Olivier Moysan olivier.moysan@foss.st.com To: Arnaud Pouliquen arnaud.pouliquen@foss.st.com To: Maxime Coquelin mcoquelin.stm32@gmail.com To: Alexandre Torgue alexandre.torgue@foss.st.com To: Kunihiko Hayashi hayashi.kunihiko@socionext.com To: Masami Hiramatsu mhiramat@kernel.org Cc: linux-media@vger.kernel.org Cc: linux-kernel@vger.kernel.org Cc: linux-sound@vger.kernel.org Cc: linux-arm-kernel@lists.infradead.org Cc: alsa-devel@alsa-project.org Cc: linux-stm32@st-md-mailman.stormreply.com Signed-off-by: Javier Carrasco javier.carrasco.cruz@gmail.com
Changes in v2: - drop cs43130 and sti-sas, as they modifiy the struct in the probe function. - Link to v1: https://lore.kernel.org/r/20240725-const_snd_soc_component_driver-v1-0-3d7ee...
--- Javier Carrasco (2): media: i2c: tda1997x: constify snd_soc_component_driver struct ASoC: constify snd_soc_component_driver struct
drivers/media/i2c/tda1997x.c | 2 +- sound/soc/au1x/dbdma2.c | 2 +- sound/soc/au1x/dma.c | 2 +- sound/soc/bcm/cygnus-pcm.c | 2 +- sound/soc/codecs/cpcap.c | 2 +- sound/soc/codecs/pcm186x.c | 4 ++-- sound/soc/codecs/pcm5102a.c | 2 +- sound/soc/codecs/spdif_receiver.c | 2 +- sound/soc/codecs/spdif_transmitter.c | 2 +- sound/soc/codecs/tas6424.c | 2 +- sound/soc/stm/stm32_adfsdm.c | 2 +- sound/soc/uniphier/evea.c | 2 +- 12 files changed, 13 insertions(+), 13 deletions(-) --- base-commit: 8400291e289ee6b2bf9779ff1c83a291501f017b change-id: 20240725-const_snd_soc_component_driver-b9629a95b948
Best regards,