summaryrefslogtreecommitdiffstats
path: root/sound/soc
diff options
context:
space:
mode:
authorKuninori Morimoto <kuninori.morimoto.gx@renesas.com>2019-08-23 09:58:32 +0900
committerMark Brown <broonie@kernel.org>2019-08-23 11:35:07 +0100
commit542694df7511977c3baa6ba855126a0cce883977 (patch)
tree94e44298d4a8f8d1ad60db3f476c6c504bc43b26 /sound/soc
parent495efdb01f89a5fc53f9b2e61f5726d804d4a15d (diff)
downloadlinux-stable-542694df7511977c3baa6ba855126a0cce883977.tar.gz
linux-stable-542694df7511977c3baa6ba855126a0cce883977.tar.bz2
linux-stable-542694df7511977c3baa6ba855126a0cce883977.zip
ASoC: soc-core: rename soc_post_component_init() to soc_rtd_init()
It is easy to read code if it is cleanly using paired function/naming, like start <-> stop, register <-> unregister, etc, etc. But, current ALSA SoC code is very random, unbalance, not paired, etc. It is easy to create bug at the such code, and it will be difficult to debug. From function name point of view, "soc_post_component_init()" sounds like "component initialize function". But in reality it is rtd setup function. This patch renames soc_post_component_init() to soc_rtd_init() Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Link: https://lore.kernel.org/r/87v9uo7lc3.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'sound/soc')
-rw-r--r--sound/soc/soc-core.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/sound/soc/soc-core.c b/sound/soc/soc-core.c
index 0af83963289f..3c087b478398 100644
--- a/sound/soc/soc-core.c
+++ b/sound/soc/soc-core.c
@@ -1340,13 +1340,12 @@ err_probe:
return ret;
}
-static void rtd_release(struct device *dev)
+static void soc_rtd_release(struct device *dev)
{
kfree(dev);
}
-static int soc_post_component_init(struct snd_soc_pcm_runtime *rtd,
- const char *name)
+static int soc_rtd_init(struct snd_soc_pcm_runtime *rtd, const char *name)
{
int ret = 0;
@@ -1355,7 +1354,7 @@ static int soc_post_component_init(struct snd_soc_pcm_runtime *rtd,
if (!rtd->dev)
return -ENOMEM;
rtd->dev->parent = rtd->card->dev;
- rtd->dev->release = rtd_release;
+ rtd->dev->release = soc_rtd_release;
rtd->dev->groups = soc_dev_attr_groups;
dev_set_name(rtd->dev, "%s", name);
dev_set_drvdata(rtd->dev, rtd);
@@ -1483,7 +1482,7 @@ static int soc_probe_link_dais(struct snd_soc_card *card,
return ret;
}
- ret = soc_post_component_init(rtd, dai_link->name);
+ ret = soc_rtd_init(rtd, dai_link->name);
if (ret)
return ret;