summaryrefslogtreecommitdiffstats
path: root/include/sound
diff options
context:
space:
mode:
authorKuninori Morimoto <kuninori.morimoto.gx@renesas.com>2019-09-12 13:41:01 +0900
committerMark Brown <broonie@kernel.org>2019-10-01 12:12:53 +0100
commitb7c5bc45ee94a03a0dc45a862180e17db8ea8e9d (patch)
tree00a268a8e4c669161f9111549fbc4123c8ce89e7 /include/sound
parent6e864344873f19120f742c19d15a8c53e7247c6a (diff)
downloadlinux-b7c5bc45ee94a03a0dc45a862180e17db8ea8e9d.tar.bz2
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 'include/sound')
-rw-r--r--include/sound/soc.h1
1 files changed, 0 insertions, 1 deletions
diff --git a/include/sound/soc.h b/include/sound/soc.h
index f264c6509f00..d93cb46c536d 100644
--- a/include/sound/soc.h
+++ b/include/sound/soc.h
@@ -1148,7 +1148,6 @@ struct snd_soc_pcm_runtime {
struct list_head component_list; /* list of connected components */
/* bit field */
- unsigned int dev_registered:1;
unsigned int pop_wait:1;
unsigned int fe_compr:1; /* for Dynamic PCM */
};