aboutsummaryrefslogtreecommitdiffstats
path: root/sound
diff options
context:
space:
mode:
authorKuninori Morimoto <kuninori.morimoto.gx@renesas.com>2020-01-20 10:04:18 +0900
committerMark Brown <broonie@kernel.org>2020-01-21 17:04:37 +0000
commit4a58fb71b5799328ea4ec84f3caee2fd4419404d (patch)
tree7dae22978ad0d3ae2c80c9d35132ae2c323e6fe2 /sound
parentASoC: samsung: spdif: move .suspend/.resume to component (diff)
downloadlinux-dev-4a58fb71b5799328ea4ec84f3caee2fd4419404d.tar.xz
linux-dev-4a58fb71b5799328ea4ec84f3caee2fd4419404d.zip
ASoC: sti: sti_uniperif: move .suspend/.resume to component
There is no big difference at implementation for .suspend/.resume between DAI driver and Component driver. But because some driver is using DAI version, thus ALSA SoC needs to keep supporting it, hence, framework becoming verbose. If we can switch all DAI driver .suspend/.resume to Component driver, we can remove verbose code from ALSA SoC. Driver is getting its private data via dai->dev. But dai->dev and component->dev are same dev, thus, we can convert these. For same reason, we can convert dai->active to component->active if necessary. This patch moves DAI driver .suspend/.resume to Component driver Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Link: https://lore.kernel.org/r/8736cbym3x.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'sound')
-rw-r--r--sound/soc/sti/sti_uniperif.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/sound/soc/sti/sti_uniperif.c b/sound/soc/sti/sti_uniperif.c
index ee4a0151e63e..7b9169f04d6e 100644
--- a/sound/soc/sti/sti_uniperif.c
+++ b/sound/soc/sti/sti_uniperif.c
@@ -308,9 +308,9 @@ int sti_uniperiph_dai_set_fmt(struct snd_soc_dai *dai, unsigned int fmt)
return 0;
}
-static int sti_uniperiph_dai_suspend(struct snd_soc_dai *dai)
+static int sti_uniperiph_suspend(struct snd_soc_component *component)
{
- struct sti_uniperiph_data *priv = snd_soc_dai_get_drvdata(dai);
+ struct sti_uniperiph_data *priv = snd_soc_component_get_drvdata(component);
struct uniperif *uni = priv->dai_data.uni;
int ret;
@@ -330,9 +330,9 @@ static int sti_uniperiph_dai_suspend(struct snd_soc_dai *dai)
return ret;
}
-static int sti_uniperiph_dai_resume(struct snd_soc_dai *dai)
+static int sti_uniperiph_resume(struct snd_soc_component *component)
{
- struct sti_uniperiph_data *priv = snd_soc_dai_get_drvdata(dai);
+ struct sti_uniperiph_data *priv = snd_soc_component_get_drvdata(component);
struct uniperif *uni = priv->dai_data.uni;
int ret;
@@ -370,12 +370,12 @@ static int sti_uniperiph_dai_probe(struct snd_soc_dai *dai)
static const struct snd_soc_dai_driver sti_uniperiph_dai_template = {
.probe = sti_uniperiph_dai_probe,
- .suspend = sti_uniperiph_dai_suspend,
- .resume = sti_uniperiph_dai_resume
};
static const struct snd_soc_component_driver sti_uniperiph_dai_component = {
.name = "sti_cpu_dai",
+ .suspend = sti_uniperiph_suspend,
+ .resume = sti_uniperiph_resume
};
static int sti_uniperiph_cpu_dai_of(struct device_node *node,