提交 a40a1660 编写于 作者: T Tom Rix 提交者: Zheng Zengkai

ASoC: samsung: change gpiod_speaker_power and rx1950_audio from global to static variables

stable inclusion
from stable-v5.10.137
commit d94a552183c0fde0c65ebdf5ed74bd9fb1dc55c4
category: bugfix
bugzilla: https://gitee.com/openeuler/kernel/issues/I60PLB

Reference: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=d94a552183c0fde0c65ebdf5ed74bd9fb1dc55c4

--------------------------------

[ Upstream commit d2294461 ]

sparse reports
sound/soc/samsung/rx1950_uda1380.c:131:18: warning: symbol 'gpiod_speaker_power' was not declared. Should it be static?
sound/soc/samsung/rx1950_uda1380.c:231:24: warning: symbol 'rx1950_audio' was not declared. Should it be static?

Both gpiod_speaker_power and rx1950_audio are only used in rx1950_uda1380.c,
so their storage class specifiers should be static.

Fixes: 83d74e35 ("ASoC: samsung: rx1950: turn into platform driver")
Signed-off-by: NTom Rix <trix@redhat.com>
Reviewed-by: NKrzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Link: https://lore.kernel.org/r/20220629185345.910406-1-trix@redhat.comSigned-off-by: NMark Brown <broonie@kernel.org>
Signed-off-by: NSasha Levin <sashal@kernel.org>
Signed-off-by: NZheng Zengkai <zhengzengkai@huawei.com>
Reviewed-by: NWei Li <liwei391@huawei.com>
上级 75c312de
...@@ -128,7 +128,7 @@ static int rx1950_startup(struct snd_pcm_substream *substream) ...@@ -128,7 +128,7 @@ static int rx1950_startup(struct snd_pcm_substream *substream)
&hw_rates); &hw_rates);
} }
struct gpio_desc *gpiod_speaker_power; static struct gpio_desc *gpiod_speaker_power;
static int rx1950_spk_power(struct snd_soc_dapm_widget *w, static int rx1950_spk_power(struct snd_soc_dapm_widget *w,
struct snd_kcontrol *kcontrol, int event) struct snd_kcontrol *kcontrol, int event)
...@@ -227,7 +227,7 @@ static int rx1950_probe(struct platform_device *pdev) ...@@ -227,7 +227,7 @@ static int rx1950_probe(struct platform_device *pdev)
return devm_snd_soc_register_card(dev, &rx1950_asoc); return devm_snd_soc_register_card(dev, &rx1950_asoc);
} }
struct platform_driver rx1950_audio = { static struct platform_driver rx1950_audio = {
.driver = { .driver = {
.name = "rx1950-audio", .name = "rx1950-audio",
.pm = &snd_soc_pm_ops, .pm = &snd_soc_pm_ops,
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册