Commit 92be5810 authored by Lars-Peter Clausen's avatar Lars-Peter Clausen Committed by Mark Brown

ASoC: pxa: Make static string arrays 'const 'char * const []'

const char * const [] is the preferred type for static string arrays since
this states explicitly that the individual entries are not going to be
changed. Due to limitations in the ASoC API it was not possible to use it
for enum text arrays. Commit 87023ff7 ('ASoC: Declare const properly for
enum texts') changed this, but most drivers still use 'const char
* []' as the type for their enum text arrays.

Change these occurrences of 'static * const char * []' to 'static const
char * const []'.

The conversion was done automatically using the following coccinelle semantic
patch:
// <smpl>
@disable optional_qualifier@
identifier s;
@@
 static
-const char *
+const char * const
 s[] = ...;
// </smpl>
Signed-off-by: default avatarLars-Peter Clausen <lars@metafoo.de>
Signed-off-by: default avatarMark Brown <broonie@kernel.org>
parent 28ab49bf
...@@ -244,9 +244,9 @@ static const struct snd_soc_dapm_route corgi_audio_map[] = { ...@@ -244,9 +244,9 @@ static const struct snd_soc_dapm_route corgi_audio_map[] = {
{"MICIN", NULL, "Line Jack"}, {"MICIN", NULL, "Line Jack"},
}; };
static const char *jack_function[] = {"Headphone", "Mic", "Line", "Headset", static const char * const jack_function[] = {"Headphone", "Mic", "Line",
"Off"}; "Headset", "Off"};
static const char *spk_function[] = {"On", "Off"}; static const char * const spk_function[] = {"On", "Off"};
static const struct soc_enum corgi_enum[] = { static const struct soc_enum corgi_enum[] = {
SOC_ENUM_SINGLE_EXT(5, jack_function), SOC_ENUM_SINGLE_EXT(5, jack_function),
SOC_ENUM_SINGLE_EXT(2, spk_function), SOC_ENUM_SINGLE_EXT(2, spk_function),
......
...@@ -376,7 +376,7 @@ static const struct snd_soc_dapm_route audio_map[] = { ...@@ -376,7 +376,7 @@ static const struct snd_soc_dapm_route audio_map[] = {
{"VINM", NULL, "Call Mic"}, {"VINM", NULL, "Call Mic"},
}; };
static const char *input_select[] = {"Call Mic", "Headset Mic"}; static const char * const input_select[] = {"Call Mic", "Headset Mic"};
static const struct soc_enum magician_in_sel_enum = static const struct soc_enum magician_in_sel_enum =
SOC_ENUM_SINGLE_EXT(2, input_select); SOC_ENUM_SINGLE_EXT(2, input_select);
......
...@@ -209,8 +209,8 @@ static const struct snd_soc_dapm_route poodle_audio_map[] = { ...@@ -209,8 +209,8 @@ static const struct snd_soc_dapm_route poodle_audio_map[] = {
{"MICIN", NULL, "Microphone"}, {"MICIN", NULL, "Microphone"},
}; };
static const char *jack_function[] = {"Off", "Headphone"}; static const char * const jack_function[] = {"Off", "Headphone"};
static const char *spk_function[] = {"Off", "On"}; static const char * const spk_function[] = {"Off", "On"};
static const struct soc_enum poodle_enum[] = { static const struct soc_enum poodle_enum[] = {
SOC_ENUM_SINGLE_EXT(2, jack_function), SOC_ENUM_SINGLE_EXT(2, jack_function),
SOC_ENUM_SINGLE_EXT(2, spk_function), SOC_ENUM_SINGLE_EXT(2, spk_function),
......
...@@ -241,9 +241,9 @@ static const struct snd_soc_dapm_route spitz_audio_map[] = { ...@@ -241,9 +241,9 @@ static const struct snd_soc_dapm_route spitz_audio_map[] = {
{"LINPUT1", NULL, "Line Jack"}, {"LINPUT1", NULL, "Line Jack"},
}; };
static const char *jack_function[] = {"Headphone", "Mic", "Line", "Headset", static const char * const jack_function[] = {"Headphone", "Mic", "Line",
"Off"}; "Headset", "Off"};
static const char *spk_function[] = {"On", "Off"}; static const char * const spk_function[] = {"On", "Off"};
static const struct soc_enum spitz_enum[] = { static const struct soc_enum spitz_enum[] = {
SOC_ENUM_SINGLE_EXT(5, jack_function), SOC_ENUM_SINGLE_EXT(5, jack_function),
SOC_ENUM_SINGLE_EXT(2, spk_function), SOC_ENUM_SINGLE_EXT(2, spk_function),
......
...@@ -170,9 +170,9 @@ static const struct snd_soc_dapm_route audio_map[] = { ...@@ -170,9 +170,9 @@ static const struct snd_soc_dapm_route audio_map[] = {
{"Mic Bias", NULL, "Headset Jack"}, {"Mic Bias", NULL, "Headset Jack"},
}; };
static const char *jack_function[] = {"Headphone", "Mic", "Line", "Headset", static const char * const jack_function[] = {"Headphone", "Mic", "Line",
"Off"}; "Headset", "Off"};
static const char *spk_function[] = {"On", "Off"}; static const char * const spk_function[] = {"On", "Off"};
static const struct soc_enum tosa_enum[] = { static const struct soc_enum tosa_enum[] = {
SOC_ENUM_SINGLE_EXT(5, jack_function), SOC_ENUM_SINGLE_EXT(5, jack_function),
SOC_ENUM_SINGLE_EXT(2, spk_function), SOC_ENUM_SINGLE_EXT(2, spk_function),
......
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