aboutsummaryrefslogtreecommitdiff
path: root/tools/perf/scripts/python/net_dropmonitor.py
diff options
context:
space:
mode:
authorKuninori Morimoto <[email protected]>2019-09-12 13:41:01 +0900
committerMark Brown <[email protected]>2019-10-01 12:12:53 +0100
commitb7c5bc45ee94a03a0dc45a862180e17db8ea8e9d (patch)
tree00a268a8e4c669161f9111549fbc4123c8ce89e7 /tools/perf/scripts/python/net_dropmonitor.py
parent6e864344873f19120f742c19d15a8c53e7247c6a (diff)
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 <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Mark Brown <[email protected]>
Diffstat (limited to 'tools/perf/scripts/python/net_dropmonitor.py')
0 files changed, 0 insertions, 0 deletions