Commit 2a54e845 authored by Takashi Sakamoto's avatar Takashi Sakamoto Committed by Mark Brown

ASoC: hisilicon: localize functions without external linkage

A driver for hi6210 sound interface on hi6220 boards includes some
functions which has no external linkage. These functions should have
static qualifier.

This commit adds the qualifier to localize the functions. This issue is
detected by sparse:

hi6210-i2s.c:100:5: warning: symbol 'hi6210_i2s_startup' was not declared. Should it be static?
hi6210-i2s.c:178:6: warning: symbol 'hi6210_i2s_shutdown' was not declared. Should it be static?
hi6210-i2s.c:527:27: warning: symbol 'hi6210_i2s_dai_init' was not declared. Should it be static?
Signed-off-by: default avatarTakashi Sakamoto <o-takashi@sakamocchi.jp>
Signed-off-by: default avatarMark Brown <broonie@kernel.org>
parent 2ea659a9
...@@ -97,8 +97,8 @@ static inline u32 hi6210_read_reg(struct hi6210_i2s *i2s, int reg) ...@@ -97,8 +97,8 @@ static inline u32 hi6210_read_reg(struct hi6210_i2s *i2s, int reg)
return readl(i2s->base + reg); return readl(i2s->base + reg);
} }
int hi6210_i2s_startup(struct snd_pcm_substream *substream, static int hi6210_i2s_startup(struct snd_pcm_substream *substream,
struct snd_soc_dai *cpu_dai) struct snd_soc_dai *cpu_dai)
{ {
struct hi6210_i2s *i2s = dev_get_drvdata(cpu_dai->dev); struct hi6210_i2s *i2s = dev_get_drvdata(cpu_dai->dev);
int ret, n; int ret, n;
...@@ -175,8 +175,9 @@ int hi6210_i2s_startup(struct snd_pcm_substream *substream, ...@@ -175,8 +175,9 @@ int hi6210_i2s_startup(struct snd_pcm_substream *substream,
return 0; return 0;
} }
void hi6210_i2s_shutdown(struct snd_pcm_substream *substream,
struct snd_soc_dai *cpu_dai) static void hi6210_i2s_shutdown(struct snd_pcm_substream *substream,
struct snd_soc_dai *cpu_dai)
{ {
struct hi6210_i2s *i2s = dev_get_drvdata(cpu_dai->dev); struct hi6210_i2s *i2s = dev_get_drvdata(cpu_dai->dev);
int n; int n;
...@@ -524,7 +525,7 @@ static struct snd_soc_dai_ops hi6210_i2s_dai_ops = { ...@@ -524,7 +525,7 @@ static struct snd_soc_dai_ops hi6210_i2s_dai_ops = {
.shutdown = hi6210_i2s_shutdown, .shutdown = hi6210_i2s_shutdown,
}; };
struct snd_soc_dai_driver hi6210_i2s_dai_init = { static const struct snd_soc_dai_driver hi6210_i2s_dai_init = {
.probe = hi6210_i2s_dai_probe, .probe = hi6210_i2s_dai_probe,
.playback = { .playback = {
.channels_min = 2, .channels_min = 2,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment