alistair23-linux/sound
Bhumika Goyal a180ba45b1 ASoC: codecs: add const to snd_soc_codec_driver structures
Declare snd_soc_codec_driver structures as const as they are only passed
as an argument to the function snd_soc_register_codec. This argument is
of type const, so declare the structures with this property as const.
In file codecs/sn95031.c, snd_soc_codec_driver structure is also used in
a copy operation along with getting passed to snd_soc_register_codec.
So, it can be made const too.
Done using Coccinelle:

@match disable optional_qualifier@
identifier s;
position p;
@@
static struct snd_soc_codec_driver s@p={...};

@good1@
identifier match.s;
position p;
@@
snd_soc_register_codec(...,&s@p,...)

@bad@
identifier match.s;
position p!={match.p,good1.p};
@@
s@p

@depends on !bad disable optional_qualifier@
identifier match.s;
@@
static
+const
struct snd_soc_codec_driver s={...};

Signed-off-by: Bhumika Goyal <bhumirks@gmail.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2017-08-10 16:10:50 +01:00
..
aoa ALSA: declare snd_kcontrol_new structures as const 2017-05-30 10:29:25 +02:00
arm
atmel ALSA: atmel: ac97c: fix error return code in atmel_ac97c_probe() 2017-07-01 08:03:34 +02:00
core sound fixes for 4.13-rc1 2017-07-14 12:44:00 -07:00
drivers ALSA: opl4: Move inline before return type 2017-07-06 09:24:17 +02:00
firewire Merge branch 'for-linus' into for-next 2017-06-20 07:53:07 +02:00
hda ALSA: hda: Fix potential race at unregistration and unsol events 2017-06-20 07:53:57 +02:00
i2c ALSA: ak411x: Use array instead of offsetof() 2017-05-17 07:13:03 +02:00
isa sound fixes for 4.13-rc1 2017-07-14 12:44:00 -07:00
mips ALSA: hal2: switch to dma_alloc_attrs 2017-06-16 11:10:05 +02:00
oss
parisc ALSA: parisc: Constify hw_constraints 2017-06-09 10:42:48 +02:00
pci sound fixes for 4.13-rc1 2017-07-14 12:44:00 -07:00
pcmcia ALSA: declare snd_kcontrol_new structures as const 2017-05-30 10:29:25 +02:00
ppc ALSA: declare snd_kcontrol_new structures as const 2017-05-30 10:29:25 +02:00
sh ALSA: sh: Convert to the new PCM ops 2017-06-02 19:38:03 +02:00
soc ASoC: codecs: add const to snd_soc_codec_driver structures 2017-08-10 16:10:50 +01:00
sparc ALSA: sparc: Constify hw_constraints 2017-06-09 10:42:56 +02:00
spi
synth ALSA: Fix forgotten dependency fix for tristate OSS sequencer kconfig 2017-06-28 08:45:07 +02:00
usb ALSA: line6: remove unnecessary initialization to PODHD500X 2017-06-20 07:51:22 +02:00
x86 main drm pull for v4.13 2017-07-09 18:48:37 -07:00
ac97_bus.c
Kconfig ALSA: synth: Select snd-emux-synth explicitly 2017-06-09 22:10:06 +02:00
last.c
Makefile
sound_core.c