]> git.baikalelectronics.ru Git - kernel.git/commit
ASoC: topology: Change allocations to resource managed
authorAmadeusz Sławiński <amadeuszx.slawinski@linux.intel.com>
Fri, 30 Oct 2020 14:54:25 +0000 (10:54 -0400)
committerMark Brown <broonie@kernel.org>
Wed, 4 Nov 2020 17:51:07 +0000 (17:51 +0000)
commite8ba926e9164fd8251f14770aaf9f9baf2e28499
tree5bd2e0e06b101bfe4a1c14d88a91d875d2e69251
parent6a03a2e533beb4f9d90687831535c15f11c7ad75
ASoC: topology: Change allocations to resource managed

In order for topology to be resource managed, change all allocations to
be resource managed:
k*alloc -> devm_k*alloc
kstrdup -> devm_kstrdup

Exceptions where non resource managed allocation is left is
soc_tplg_dapm_widget_create(), as it uses pointer to memory locally and
frees it up after use, as well as soc_tplg_dapm_graph_elems_load(),
which has temporary pointer to table of routes.

After conversion all redundant calls in error and clean up paths were
removed.

Also removed some variables which become unneeded when there is no calls
using them.

Reviewed-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
Signed-off-by: Amadeusz Sławiński <amadeuszx.slawinski@linux.intel.com>
Reviewed-by: Cezary Rojewski <cezary.rojewski@intel.com>
Link: https://lore.kernel.org/r/20201030145427.3497990-5-amadeuszx.slawinski@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
sound/soc/soc-topology.c