summaryrefslogtreecommitdiffstats
path: root/crypto/Kconfig
diff options
context:
space:
mode:
authorKuninori Morimoto <kuninori.morimoto.gx@renesas.com>2019-09-12 06:41:01 +0200
committerMark Brown <broonie@kernel.org>2019-10-01 13:12:53 +0200
commitb7c5bc45ee94a03a0dc45a862180e17db8ea8e9d (patch)
tree00a268a8e4c669161f9111549fbc4123c8ce89e7 /crypto/Kconfig
parentASoC: soc-core: merge soc_new_pcm_runtime() and soc_rtd_init() (diff)
downloadlinux-b7c5bc45ee94a03a0dc45a862180e17db8ea8e9d.tar.xz
linux-b7c5bc45ee94a03a0dc45a862180e17db8ea8e9d.zip
ASoC: soc-core: merge soc_free_pcm_runtime() and soc_rtd_free()
"rtd" is handled by soc_xxx_pcm_runtime(), and "rtd->dev" is handled by soc_rtd_xxx(). There is no reason to separate these, and it makes code complex. We can free these in the same time. Here soc_rtd_free() (A) which frees rtd->dev is called from soc_remove_link_dais() many times (1). Then, it is using dev_registered flags to avoid multi kfree() (2). This is no longer needed if we can merge these functions. static void soc_remove_link_dais(...) { ... (1) for_each_comp_order(order) { (1) for_each_card_rtds(card, rtd) { (A) soc_rtd_free(rtd); ... } } } (A) static void soc_rtd_free(...) { (2) if (rtd->dev_registered) { /* we don't need to call kfree() for rtd->dev */ device_unregister(rtd->dev); (2) rtd->dev_registered = 0; } } This patch merges soc_rtd_free() into soc_free_pcm_runtime(). Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Link: https://lore.kernel.org/r/878squf7oi.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'crypto/Kconfig')
0 files changed, 0 insertions, 0 deletions