diff options
author | Liam Girdwood <liam.r.girdwood@linux.intel.com> | 2014-11-04 08:27:45 -0500 |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2014-11-04 10:13:36 -0500 |
commit | 7b8ef67a0b1edb37957a2aa71a5c0bbbcf2694e9 (patch) | |
tree | f958fe95036993882d7e8de544a72c29a58b6599 /sound/soc/intel/sst-haswell-pcm.c | |
parent | e648f6add20d1cfb5945e24b5bffe5843476645b (diff) |
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: kbuild test robot <fengguang.wu@intel.com>
Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'sound/soc/intel/sst-haswell-pcm.c')
-rw-r--r-- | sound/soc/intel/sst-haswell-pcm.c | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/sound/soc/intel/sst-haswell-pcm.c b/sound/soc/intel/sst-haswell-pcm.c index 093b9393ae46..e7a3b6af87ba 100644 --- a/sound/soc/intel/sst-haswell-pcm.c +++ b/sound/soc/intel/sst-haswell-pcm.c | |||
@@ -1003,7 +1003,6 @@ static int hsw_pcm_dev_remove(struct platform_device *pdev) | |||
1003 | return 0; | 1003 | return 0; |
1004 | } | 1004 | } |
1005 | 1005 | ||
1006 | #ifdef CONFIG_PM | ||
1007 | #ifdef CONFIG_PM_RUNTIME | 1006 | #ifdef CONFIG_PM_RUNTIME |
1008 | 1007 | ||
1009 | static int hsw_pcm_runtime_idle(struct device *dev) | 1008 | static int hsw_pcm_runtime_idle(struct device *dev) |
@@ -1063,6 +1062,8 @@ static int hsw_pcm_runtime_resume(struct device *dev) | |||
1063 | #define hsw_pcm_runtime_resume NULL | 1062 | #define hsw_pcm_runtime_resume NULL |
1064 | #endif | 1063 | #endif |
1065 | 1064 | ||
1065 | #if defined(CONFIG_PM_SLEEP) && defined(CONFIG_PM_RUNTIME) | ||
1066 | |||
1066 | static void hsw_pcm_complete(struct device *dev) | 1067 | static void hsw_pcm_complete(struct device *dev) |
1067 | { | 1068 | { |
1068 | struct hsw_priv_data *pdata = dev_get_drvdata(dev); | 1069 | struct hsw_priv_data *pdata = dev_get_drvdata(dev); |
@@ -1158,6 +1159,11 @@ static int hsw_pcm_prepare(struct device *dev) | |||
1158 | return 0; | 1159 | return 0; |
1159 | } | 1160 | } |
1160 | 1161 | ||
1162 | #else | ||
1163 | #define hsw_pcm_prepare NULL | ||
1164 | #define hsw_pcm_complete NULL | ||
1165 | #endif | ||
1166 | |||
1161 | static const struct dev_pm_ops hsw_pcm_pm = { | 1167 | static const struct dev_pm_ops hsw_pcm_pm = { |
1162 | .runtime_idle = hsw_pcm_runtime_idle, | 1168 | .runtime_idle = hsw_pcm_runtime_idle, |
1163 | .runtime_suspend = hsw_pcm_runtime_suspend, | 1169 | .runtime_suspend = hsw_pcm_runtime_suspend, |
@@ -1165,9 +1171,6 @@ static const struct dev_pm_ops hsw_pcm_pm = { | |||
1165 | .prepare = hsw_pcm_prepare, | 1171 | .prepare = hsw_pcm_prepare, |
1166 | .complete = hsw_pcm_complete, | 1172 | .complete = hsw_pcm_complete, |
1167 | }; | 1173 | }; |
1168 | #else | ||
1169 | #define hsw_pcm_pm NULL | ||
1170 | #endif | ||
1171 | 1174 | ||
1172 | static struct platform_driver hsw_pcm_driver = { | 1175 | static struct platform_driver hsw_pcm_driver = { |
1173 | .driver = { | 1176 | .driver = { |