diff options
| author | Takashi Iwai <[email protected]> | 2019-01-18 16:37:14 +0000 |
|---|---|---|
| committer | Takashi Iwai <[email protected]> | 2019-01-18 16:37:21 +0000 |
| commit | 436ec40e0cdf74eae90af6be6c287396e388f1fb (patch) | |
| tree | ec85647d69d9d2a8f47da48e1ef0175c457c4bcc /sound/core/pcm_native.c | |
| parent | ALSA: hda: program stripe control for codec (diff) | |
| parent | ALSA: pcm: Make snd_pcm_suspend() local static (diff) | |
| download | kernel-436ec40e0cdf74eae90af6be6c287396e388f1fb.tar.gz kernel-436ec40e0cdf74eae90af6be6c287396e388f1fb.zip | |
Merge branch 'topic/pcm-device-suspend' into for-next
Pull the PCM suspend improvement / cleanup.
This moves the most of snd_pcm_suspend*() calls into PCM's own device
PM ops. There should be no change from the functionality POV.
Signed-off-by: Takashi Iwai <[email protected]>
Diffstat (limited to 'sound/core/pcm_native.c')
| -rw-r--r-- | sound/core/pcm_native.c | 11 |
1 files changed, 3 insertions, 8 deletions
diff --git a/sound/core/pcm_native.c b/sound/core/pcm_native.c index 818dff1de545..26afb6b0889a 100644 --- a/sound/core/pcm_native.c +++ b/sound/core/pcm_native.c @@ -1460,29 +1460,24 @@ static const struct action_ops snd_pcm_action_suspend = { .post_action = snd_pcm_post_suspend }; -/** +/* * snd_pcm_suspend - trigger SUSPEND to all linked streams * @substream: the PCM substream * * After this call, all streams are changed to SUSPENDED state. * - * Return: Zero if successful (or @substream is %NULL), or a negative error - * code. + * Return: Zero if successful, or a negative error code. */ -int snd_pcm_suspend(struct snd_pcm_substream *substream) +static int snd_pcm_suspend(struct snd_pcm_substream *substream) { int err; unsigned long flags; - if (! substream) - return 0; - snd_pcm_stream_lock_irqsave(substream, flags); err = snd_pcm_action(&snd_pcm_action_suspend, substream, 0); snd_pcm_stream_unlock_irqrestore(substream, flags); return err; } -EXPORT_SYMBOL(snd_pcm_suspend); /** * snd_pcm_suspend_all - trigger SUSPEND to all substreams in the given pcm |
