All of lore.kernel.org
 help / color / mirror / Atom feed
From: Takashi Iwai <tiwai@suse.de>
To: alsa-devel@alsa-project.org
Cc: Libin Yang <libin.yang@intel.com>,
	Mengdong Lin <mengdong.lin@intel.com>,
	Keyon Jie <yang.jie@linux.intel.com>,
	Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>,
	liam.r.girdwood@linux.intel.com, broonie@kernel.org
Subject: [PATCH 14/14] ALSA: pcm: Make snd_pcm_suspend() local static
Date: Tue, 15 Jan 2019 17:21:55 +0100	[thread overview]
Message-ID: <20190115162155.6308-15-tiwai@suse.de> (raw)
In-Reply-To: <20190115162155.6308-1-tiwai@suse.de>

snd_pcm_suspend() is no longer called from outside, so let's make it
local static.  Also drop a superfluous NULL check there.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
---
 include/sound/pcm.h     |  5 -----
 sound/core/pcm_native.c | 11 +++--------
 2 files changed, 3 insertions(+), 13 deletions(-)

diff --git a/include/sound/pcm.h b/include/sound/pcm.h
index 04e97564949c..2c30c1ad1b0d 100644
--- a/include/sound/pcm.h
+++ b/include/sound/pcm.h
@@ -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;
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
-- 
2.20.1

  parent reply	other threads:[~2019-01-15 16:21 UTC|newest]

Thread overview: 31+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-01-15 16:21 [PATCH 00/14] ALSA: PCM suspend cleanup Takashi Iwai
2019-01-15 16:21 ` [PATCH 01/14] ALSA: pcm: Suspend streams globally via device type PM ops Takashi Iwai
2019-01-28 18:11   ` Mark Brown
2019-01-15 16:21 ` [PATCH 02/14] ALSA: atiixp: Move PCM suspend/resume code into trigger callback Takashi Iwai
2019-01-15 16:21 ` [PATCH 03/14] ALSA: isa: Remove superfluous snd_pcm_suspend*() calls Takashi Iwai
2019-01-15 16:21 ` [PATCH 04/14] ALSA: drivers: " Takashi Iwai
2019-01-15 16:21 ` [PATCH 05/14] ALSA: pci: " Takashi Iwai
2019-01-15 16:49   ` Pierre-Louis Bossart
2019-01-15 17:01     ` Takashi Iwai
2019-01-15 20:42       ` Takashi Iwai
2019-01-16 15:50         ` Mark Brown
2019-01-16 15:52           ` Takashi Iwai
2019-01-16 16:32             ` Mark Brown
2019-01-17 15:55             ` Mark Brown
2019-01-17  2:21         ` Pierre-Louis Bossart
2019-01-17  8:39           ` Takashi Iwai
2019-01-28 19:28             ` Pierre-Louis Bossart
2019-01-15 16:21 ` [PATCH 06/14] ALSA: usb: " Takashi Iwai
2019-01-15 16:21 ` [PATCH 07/14] ALSA: x86: " Takashi Iwai
2019-01-15 16:21 ` [PATCH 08/14] ALSA: ppc: " Takashi Iwai
2019-01-15 16:21 ` [PATCH 09/14] ALSA: aoa: " Takashi Iwai
2019-01-15 16:21 ` [PATCH 10/14] ALSA: arm: " Takashi Iwai
2019-01-15 16:21 ` [PATCH 11/14] ALSA: pcmcia: " Takashi Iwai
2019-01-15 16:21 ` [PATCH 12/14] drm: bridge: dw-hdmi: " Takashi Iwai
2019-01-15 16:21 ` [PATCH 13/14] ALSA: doc: Update the description about PCM suspend procedure Takashi Iwai
2019-01-15 16:21 ` Takashi Iwai [this message]
2019-01-17  1:50   ` [PATCH 14/14] ALSA: pcm: Make snd_pcm_suspend() local static Yang, Libin
2019-01-17  7:43     ` Takashi Iwai
2019-01-17 14:53       ` Yang, Libin
2019-01-15 16:32 ` [PATCH 00/14] ALSA: PCM suspend cleanup Jaroslav Kysela
2019-01-17  1:47 ` Yang, Libin

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20190115162155.6308-15-tiwai@suse.de \
    --to=tiwai@suse.de \
    --cc=alsa-devel@alsa-project.org \
    --cc=broonie@kernel.org \
    --cc=liam.r.girdwood@linux.intel.com \
    --cc=libin.yang@intel.com \
    --cc=mengdong.lin@intel.com \
    --cc=pierre-louis.bossart@linux.intel.com \
    --cc=yang.jie@linux.intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.