[PATCH v2 0/2] {ASoC,media}: constify snd_soc_component_driver when used as read-only

Javier Carrasco javier.carrasco.cruz at gmail.com
Mon Jul 29 02:37:36 PDT 2024


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 at gateworks.com>
To: Mauro Carvalho Chehab <mchehab at kernel.org>
To: Liam Girdwood <lgirdwood at gmail.com>
To: Mark Brown <broonie at kernel.org>
To: Jaroslav Kysela <perex at perex.cz>
To: Takashi Iwai <tiwai at suse.com>
To: Ray Jui <rjui at broadcom.com>
To: Scott Branden <sbranden at broadcom.com>
To: Broadcom internal kernel review list <bcm-kernel-feedback-list at broadcom.com>
To: Shenghao Ding <shenghao-ding at ti.com>
To: Kevin Lu <kevin-lu at ti.com>
To: Baojun Xu <baojun.xu at ti.com>
To: Olivier Moysan <olivier.moysan at foss.st.com>
To: Arnaud Pouliquen <arnaud.pouliquen at foss.st.com>
To: Maxime Coquelin <mcoquelin.stm32 at gmail.com>
To: Alexandre Torgue <alexandre.torgue at foss.st.com>
To: Kunihiko Hayashi <hayashi.kunihiko at socionext.com>
To: Masami Hiramatsu <mhiramat at kernel.org>
Cc: linux-media at vger.kernel.org
Cc: linux-kernel at vger.kernel.org
Cc: linux-sound at vger.kernel.org
Cc: linux-arm-kernel at lists.infradead.org
Cc: alsa-devel at alsa-project.org
Cc: linux-stm32 at st-md-mailman.stormreply.com
Signed-off-by: Javier Carrasco <javier.carrasco.cruz at 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-3d7ee08e129b@gmail.com

---
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,
-- 
Javier Carrasco <javier.carrasco.cruz at gmail.com>




More information about the linux-arm-kernel mailing list