diff options
author | Takashi Iwai <tiwai@suse.de> | 2017-02-05 10:58:46 +0300 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2017-02-05 10:58:46 +0300 |
commit | 1cf05ba2cafa079a943c2cbae51b2f2c2e247466 (patch) | |
tree | 75938e8223376d08d30ec271f125d59892272480 | |
parent | b556290f9a8386ff6afeec12cae29fbab77321a3 (diff) | |
download | linux-1cf05ba2cafa079a943c2cbae51b2f2c2e247466.tar.xz |
ALSA: pcm: Define dummy snd_pcm_suspend() for CONFIG_PM=n
... so that the driver can avoid ifdef's for the dead PM callbacks.
The compiler should optimize them out in anyway.
Reported-by: kbuild test robot <fengguang.wu@intel.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
-rw-r--r-- | include/sound/pcm.h | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/include/sound/pcm.h b/include/sound/pcm.h index af1fb37c6b26..361749e60799 100644 --- a/include/sound/pcm.h +++ b/include/sound/pcm.h @@ -570,6 +570,15 @@ int snd_pcm_stop_xrun(struct snd_pcm_substream *substream); #ifdef CONFIG_PM int snd_pcm_suspend(struct snd_pcm_substream *substream); int snd_pcm_suspend_all(struct snd_pcm *pcm); +#else +static inline int snd_pcm_suspend(struct snd_pcm_substream *substream) +{ + return 0; +} +static inline int snd_pcm_suspend_all(struct snd_pcm *pcm) +{ + return 0; +} #endif int snd_pcm_kernel_ioctl(struct snd_pcm_substream *substream, unsigned int cmd, void *arg); int snd_pcm_open_substream(struct snd_pcm *pcm, int stream, struct file *file, |