diff mbox

ASoC: add static inline funcs to fix a compiling issue

Message ID 1429407948-14158-1-git-send-email-yang.jie@intel.com (mailing list archive)
State Accepted
Commit aae013d646aae8787b76255d1a1cadd7f64a47dd
Headers show

Commit Message

Jie, Yang April 19, 2015, 1:45 a.m. UTC
When CONFIG_PM_SLEEP is not selected, calling funcs
snd_soc_suspend and _resume will generate a compiling
issue.

Here add static inline stub functions to fix it.

Signed-off-by: Jie Yang <yang.jie@intel.com>
---
 include/sound/soc.h | 12 ++++++++++++
 1 file changed, 12 insertions(+)

Comments

Mark Brown April 19, 2015, 12:22 p.m. UTC | #1
On Sun, Apr 19, 2015 at 09:45:48AM +0800, Jie Yang wrote:
> When CONFIG_PM_SLEEP is not selected, calling funcs
> snd_soc_suspend and _resume will generate a compiling
> issue.

Applied, thanks.
diff mbox

Patch

diff --git a/include/sound/soc.h b/include/sound/soc.h
index 2afdd2e..64041f5 100644
--- a/include/sound/soc.h
+++ b/include/sound/soc.h
@@ -387,8 +387,20 @@  int snd_soc_codec_set_pll(struct snd_soc_codec *codec, int pll_id, int source,
 int snd_soc_register_card(struct snd_soc_card *card);
 int snd_soc_unregister_card(struct snd_soc_card *card);
 int devm_snd_soc_register_card(struct device *dev, struct snd_soc_card *card);
+#ifdef CONFIG_PM_SLEEP
 int snd_soc_suspend(struct device *dev);
 int snd_soc_resume(struct device *dev);
+#else
+static inline int snd_soc_suspend(struct device *dev)
+{
+	return 0;
+}
+
+static inline int snd_soc_resume(struct device *dev)
+{
+	return 0;
+}
+#endif
 int snd_soc_poweroff(struct device *dev);
 int snd_soc_register_platform(struct device *dev,
 		const struct snd_soc_platform_driver *platform_drv);