diff options
author | Lars-Peter Clausen <lars@metafoo.de> | 2016-11-12 14:23:13 +0100 |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2016-11-13 11:36:59 +0000 |
commit | 92be58106e5d750b97567bea7171f5aee74a678a (patch) | |
tree | 628a877e3a5e5536784bb5d9880b43390d2a15ad /sound/soc/pxa/tosa.c | |
parent | 28ab49bf9bd9185d8221392a5195bb6c989ed7c7 (diff) | |
download | linux-stable-92be58106e5d750b97567bea7171f5aee74a678a.tar.gz linux-stable-92be58106e5d750b97567bea7171f5aee74a678a.tar.bz2 linux-stable-92be58106e5d750b97567bea7171f5aee74a678a.zip |
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 87023ff74 ('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: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'sound/soc/pxa/tosa.c')
-rw-r--r-- | sound/soc/pxa/tosa.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/sound/soc/pxa/tosa.c b/sound/soc/pxa/tosa.c index c508f024ecfb..08b0cf50e91a 100644 --- a/sound/soc/pxa/tosa.c +++ b/sound/soc/pxa/tosa.c @@ -170,9 +170,9 @@ static const struct snd_soc_dapm_route audio_map[] = { {"Mic Bias", NULL, "Headset Jack"}, }; -static const char *jack_function[] = {"Headphone", "Mic", "Line", "Headset", - "Off"}; -static const char *spk_function[] = {"On", "Off"}; +static const char * const jack_function[] = {"Headphone", "Mic", "Line", + "Headset", "Off"}; +static const char * const spk_function[] = {"On", "Off"}; static const struct soc_enum tosa_enum[] = { SOC_ENUM_SINGLE_EXT(5, jack_function), SOC_ENUM_SINGLE_EXT(2, spk_function), |