Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 7b8ef67a authored by Liam Girdwood's avatar Liam Girdwood Committed by Mark Brown
Browse files

ASoC: Intel: Fix build with CONFIG_SLEEP enabled.



Fix the following build error when CONFIG_SLEEP is enabled and CONFIG_RUNTIME
is disabled. The BDW ADSP sleep PM functionality depends on the runtime pm
calls for context save/restore.

All error/warnings:

>> ERROR: "snd_soc_suspend" undefined!
>> ERROR: "snd_soc_resume" undefined!

Reported-by: default avatarkbuild test robot <fengguang.wu@intel.com>
Signed-off-by: default avatarLiam Girdwood <liam.r.girdwood@linux.intel.com>
Signed-off-by: default avatarMark Brown <broonie@kernel.org>
parent e648f6ad
Loading
Loading
Loading
Loading
+7 −4
Original line number Diff line number Diff line
@@ -1003,7 +1003,6 @@ static int hsw_pcm_dev_remove(struct platform_device *pdev)
	return 0;
}

#ifdef CONFIG_PM
#ifdef CONFIG_PM_RUNTIME

static int hsw_pcm_runtime_idle(struct device *dev)
@@ -1063,6 +1062,8 @@ static int hsw_pcm_runtime_resume(struct device *dev)
#define hsw_pcm_runtime_resume		NULL
#endif

#if defined(CONFIG_PM_SLEEP) && defined(CONFIG_PM_RUNTIME)

static void hsw_pcm_complete(struct device *dev)
{
	struct hsw_priv_data *pdata = dev_get_drvdata(dev);
@@ -1158,6 +1159,11 @@ static int hsw_pcm_prepare(struct device *dev)
	return 0;
}

#else
#define hsw_pcm_prepare		NULL
#define hsw_pcm_complete	NULL
#endif

static const struct dev_pm_ops hsw_pcm_pm = {
	.runtime_idle = hsw_pcm_runtime_idle,
	.runtime_suspend = hsw_pcm_runtime_suspend,
@@ -1165,9 +1171,6 @@ static const struct dev_pm_ops hsw_pcm_pm = {
	.prepare = hsw_pcm_prepare,
	.complete = hsw_pcm_complete,
};
#else
#define hsw_pcm_pm	NULL
#endif

static struct platform_driver hsw_pcm_driver = {
	.driver = {