diff options
author | Peter Ujfalusi <peter.ujfalusi@linux.intel.com> | 2021-10-06 13:16:51 +0200 |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2021-10-07 16:45:45 +0200 |
commit | d8a15e5fcae132dc6a44847535ce355f6fba46f8 (patch) | |
tree | 71de0fea8aae2c0cb237408449bbb22a953ca11c /sound/soc/sof/pm.c | |
parent | ASoC: SOF: topology: do not power down primary core during topology removal (diff) | |
download | linux-d8a15e5fcae132dc6a44847535ce355f6fba46f8.tar.xz linux-d8a15e5fcae132dc6a44847535ce355f6fba46f8.zip |
ASoC: SOF: pipelines: Harmonize all functions to use struct snd_sof_dev
First thing the pipelines function which have "struct device *dev" as
parameter do is:
struct snd_sof_dev *sdev = dev_get_drvdata(dev);
and in all cases the passed dev is actually coming from sdev->dev.
Skip this steps and pass directly the sdev to all pipelines related
functions as few of them already does this.
Signed-off-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com>
Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Reviewed-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
Link: https://lore.kernel.org/r/20211006111651.10027-1-peter.ujfalusi@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'sound/soc/sof/pm.c')
-rw-r--r-- | sound/soc/sof/pm.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sound/soc/sof/pm.c b/sound/soc/sof/pm.c index 77a3496d3dbd..e65f4f4d6df9 100644 --- a/sound/soc/sof/pm.c +++ b/sound/soc/sof/pm.c @@ -157,7 +157,7 @@ static int sof_resume(struct device *dev, bool runtime_resume) } /* restore pipelines */ - ret = sof_set_up_pipelines(sdev->dev, false); + ret = sof_set_up_pipelines(sdev, false); if (ret < 0) { dev_err(sdev->dev, "error: failed to restore pipeline after resume %d\n", @@ -208,7 +208,7 @@ static int sof_suspend(struct device *dev, bool runtime_suspend) if (target_state == SOF_DSP_PM_D0) goto suspend; - sof_tear_down_pipelines(dev, false); + sof_tear_down_pipelines(sdev, false); /* release trace */ snd_sof_release_trace(sdev); |