]> asedeno.scripts.mit.edu Git - linux.git/commitdiff
ALSA: pcm: Make snd_pcm_suspend() local static
authorTakashi Iwai <tiwai@suse.de>
Tue, 15 Jan 2019 09:54:02 +0000 (10:54 +0100)
committerTakashi Iwai <tiwai@suse.de>
Tue, 15 Jan 2019 16:48:23 +0000 (17:48 +0100)
snd_pcm_suspend() is no longer called from outside, so let's make it
local static.  Also drop a superfluous NULL check there.

Reviewed-by: Jaroslav Kysela <perex@perex.cz>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
include/sound/pcm.h
sound/core/pcm_native.c

index 04e97564949c196820030aca9bebead22e89069a..2c30c1ad1b0dca6d6b6acf4c0bff9ab3ab3966a1 100644 (file)
@@ -582,13 +582,8 @@ int snd_pcm_stop(struct snd_pcm_substream *substream, snd_pcm_state_t status);
 int snd_pcm_drain_done(struct snd_pcm_substream *substream);
 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;
index 818dff1de545fad25669adf1144cbd49e5934067..26afb6b0889adf0b831d578b6adacbeef0a799c9 100644 (file)
@@ -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