diff mbox

[next] ASoC: TSCS42xx: make functions pll_event and dac_event static

Message ID 20180108231444.8415-1-colin.king@canonical.com (mailing list archive)
State Accepted
Commit 3511108a790fc8942448556b82046d6de945b80f
Headers show

Commit Message

Colin King Jan. 8, 2018, 11:14 p.m. UTC
From: Colin Ian King <colin.king@canonical.com>

The functions pll_event and dac_event are local to the source and do
not need to be in global scope, so make them static.

Cleans up sparse warnings:
symbol 'pll_event' was not declared. Should it be static?
symbol 'dac_event' was not declared. Should it be static?

Signed-off-by: Colin Ian King <colin.king@canonical.com>
---
 sound/soc/codecs/tscs42xx.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

Comments

Steven Eckhoff Jan. 9, 2018, 3:52 p.m. UTC | #1
On Mon, Jan 08, 2018 at 11:14:44PM +0000, Colin King wrote:

> The functions pll_event and dac_event are local to the source and do
> not need to be in global scope, so make them static.

This looks good to me. Thanks for catching this. You can add:

Reviewed-by: Steven Eckhoff <steven.eckhoff.opensource@gmail.com>
diff mbox

Patch

diff --git a/sound/soc/codecs/tscs42xx.c b/sound/soc/codecs/tscs42xx.c
index eedd600875e5..9e8155766ea9 100644
--- a/sound/soc/codecs/tscs42xx.c
+++ b/sound/soc/codecs/tscs42xx.c
@@ -355,8 +355,8 @@  static int dapm_micb_event(struct snd_soc_dapm_widget *w,
 	return 0;
 }
 
-int pll_event(struct snd_soc_dapm_widget *w,
-		   struct snd_kcontrol *kcontrol, int event)
+static int pll_event(struct snd_soc_dapm_widget *w,
+		     struct snd_kcontrol *kcontrol, int event)
 {
 	struct snd_soc_codec *codec = snd_soc_dapm_to_codec(w->dapm);
 	int ret;
@@ -369,8 +369,8 @@  int pll_event(struct snd_soc_dapm_widget *w,
 	return ret;
 }
 
-int dac_event(struct snd_soc_dapm_widget *w,
-		   struct snd_kcontrol *kcontrol, int event)
+static int dac_event(struct snd_soc_dapm_widget *w,
+		     struct snd_kcontrol *kcontrol, int event)
 {
 	struct snd_soc_codec *codec = snd_soc_dapm_to_codec(w->dapm);
 	struct tscs42xx *tscs42xx = snd_soc_codec_get_drvdata(codec);