linux/sound/soc
Lars-Peter Clausen 4806896175 ASoC: dapm: Avoid duplicating immutable strings
When creating a new widget from a template the name string of the template
is duplicated for the newly created widget. This is necessary because in
some cases the string might be stored on the stack or other volatile
memory locations.

But most of the time the string is static const data, which means it is
possible to use it directly without having to worry that it might get freed
or changed.

Use kstrdup_const() to handle duplicating the string. This function is
capable of detecting whether a string is immutable and if it is returns the
input without duplicating it. This will slightly reduce the runtime memory
footprint of DAPM and also speed up initialization.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-07-21 18:08:53 +01:00
..
adi ASoC: adi: Add missing return statement. 2015-01-05 20:16:20 +00:00
atmel Merge remote-tracking branches 'asoc/topic/adsp' and 'asoc/topic/atmel' into asoc-next 2015-06-22 10:24:28 +01:00
au1x ASoC: au1x: Constify platform_device_id 2015-05-01 17:46:15 +01:00
bcm
blackfin Driver core patches for 3.19-rc1 2014-12-14 16:10:09 -08:00
cirrus ASoC: dmaengine_pcm: Make FLAG_NO_RESIDUE internal 2015-04-27 19:26:07 +01:00
codecs Merge remote-tracking branch 'asoc/topic/arizona' into asoc-next 2015-06-22 11:19:45 +01:00
davinci Merge remote-tracking branch 'asoc/topic/davinci' into asoc-next 2015-06-22 10:24:30 +01:00
dwc Merge remote-tracking branches 'asoc/topic/doc', 'asoc/topic/dwc', 'asoc/topic/fsi', 'asoc/topic/fsl' and 'asoc/topic/fsl-asrc' into asoc-next 2015-02-09 15:10:17 +08:00
fsl Merge remote-tracking branch 'asoc/topic/fsl' into asoc-next 2015-06-22 10:24:30 +01:00
generic ASoC: simple card: Add mclk-fs property in dai-link 2015-06-12 12:35:54 +01:00
intel ASoC: Further updates for v4.2 2015-06-22 11:32:41 +02:00
jz4740 ASoC: jz4740: Add jz4780 support 2015-03-09 18:10:17 +00:00
kirkwood Merge remote-tracking branches 'asoc/topic/jack', 'asoc/topic/jz4740' and 'asoc/topic/kirkwood' into asoc-next 2015-04-12 19:49:03 +01:00
mediatek ASoC: mediatek: Add machine driver for rt5650 rt5676 codec 2015-06-16 12:52:36 +01:00
mxs Merge remote-tracking branches 'asoc/topic/mxs-saif' and 'asoc/topic/nuc900' into asoc-next 2015-02-09 15:10:23 +08:00
nuc900 ASoC: nuc900: No need to track the dma buffer in the driver state struct 2015-03-16 11:40:52 +00:00
omap sound updates for 4.2-rc1 2015-06-25 17:15:18 -07:00
pxa ASoC: z2: Automatically disconnect non-connected pins 2015-05-08 12:05:07 +01:00
qcom Merge remote-tracking branches 'asoc/topic/qcom', 'asoc/topic/rcar', 'asoc/topic/rt286' and 'asoc/topic/rt5640' into asoc-next 2015-06-22 10:24:33 +01:00
rockchip ASoC: Updates for v3.20 2015-02-09 15:09:48 +08:00
samsung Merge remote-tracking branches 'asoc/topic/rt5677', 'asoc/topic/samsung' and 'asoc/topic/sgtl5000' into asoc-next 2015-06-05 18:54:59 +01:00
sh sound updates for 4.2-rc1 2015-06-25 17:15:18 -07:00
sirf
spear
tegra ASoC: tegra_wm9712: Use card DAPM context to access widgets 2015-04-08 21:10:01 +01:00
txx9 ASoC: txx9: Remove unnecessary snd_pcm_lib_preallocate_free_for_all() 2015-01-05 21:30:20 +00:00
ux500 Merge remote-tracking branch 'asoc/topic/dma' into asoc-next 2015-06-05 18:54:45 +01:00
xtensa ASoC: add xtensa xtfpga I2S interface and platform 2015-01-08 19:52:11 +00:00
zte ASoC: zx: fix platform_no_drv_owner.cocci warnings 2015-06-04 18:16:40 +01:00
Kconfig Merge remote-tracking branches 'asoc/topic/mediatek', 'asoc/topic/ml26124' and 'asoc/topic/omap' into asoc-next 2015-06-22 10:24:31 +01:00
Makefile Merge remote-tracking branches 'asoc/topic/mediatek', 'asoc/topic/ml26124' and 'asoc/topic/omap' into asoc-next 2015-06-22 10:24:31 +01:00
soc-ac97.c ASoC: Add support for allocating AC'97 device before registering it 2015-01-26 19:14:20 +00:00
soc-cache.c ASoC: Remove snd_soc_cache_sync() implementation 2014-11-09 09:06:30 +00:00
soc-compress.c ASoC: soc-compress.c: fix NULL dereference 2015-01-15 15:54:04 +00:00
soc-core.c ASoC: Free card DAPM context on snd_soc_instantiate_card() error path 2015-07-08 22:16:51 +01:00
soc-dapm.c ASoC: dapm: Avoid duplicating immutable strings 2015-07-21 18:08:53 +01:00
soc-devres.c ASoC: Fix warning with make xmldocs caused by soc-devres.c 2015-01-28 11:36:03 +00:00
soc-generic-dmaengine-pcm.c ASoC: dmaengine_pcm: Make FLAG_NO_RESIDUE internal 2015-04-27 19:26:07 +01:00
soc-io.c
soc-jack.c ASoC: Updates for v4.2 2015-06-08 20:47:53 +02:00
soc-ops.c
soc-pcm.c ASoC: soc-pcm: DPCM cares BE format 2015-05-22 13:38:40 +01:00
soc-topology.c ASoC: dapm: Add helper function to free a widget 2015-07-21 18:08:53 +01:00
soc-utils.c