Skip to content

Commit

Permalink
ALSA: pcm: Define dummy snd_pcm_suspend() for CONFIG_PM=n
Browse files Browse the repository at this point in the history
... 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 <[email protected]>
Signed-off-by: Takashi Iwai <[email protected]>
  • Loading branch information
tiwai committed Feb 5, 2017
1 parent b556290 commit 1cf05ba
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions include/sound/pcm.h
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit 1cf05ba

Please sign in to comment.