Преглед на файлове

ASOC: tpa6130a2: add static qualifier for file local symbols

Sparse reports a below warning.

tpa6130a2.c:193:33: warning: symbol 'tpa6130a2_component_driver' was not declared. Should it be static?

The symbol is just used inner the file. Forthermore, it's constant. Thus,
it's better to add static and const qualifier.

This commit adds it.

Fixes: cb7e62256e99 (ASoC: tpa6130a2: Register component)
Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
Signed-off-by: Mark Brown <broonie@kernel.org>
Takashi Sakamoto преди 8 години
родител
ревизия
3cadd22447
променени са 1 файла, в които са добавени 1 реда и са изтрити 1 реда
  1. 1 1
      sound/soc/codecs/tpa6130a2.c

+ 1 - 1
sound/soc/codecs/tpa6130a2.c

@@ -199,7 +199,7 @@ static const struct snd_soc_dapm_route tpa6130a2_dapm_routes[] = {
 	{ "Right PGA", NULL, "Power" },
 	{ "Right PGA", NULL, "Power" },
 };
 };
 
 
-struct snd_soc_component_driver tpa6130a2_component_driver = {
+static const struct snd_soc_component_driver tpa6130a2_component_driver = {
 	.name = "tpa6130a2",
 	.name = "tpa6130a2",
 	.probe = tpa6130a2_component_probe,
 	.probe = tpa6130a2_component_probe,
 	.dapm_widgets = tpa6130a2_dapm_widgets,
 	.dapm_widgets = tpa6130a2_dapm_widgets,