diff options
author | Lars-Peter Clausen <lars@metafoo.de> | 2016-11-22 11:29:14 +0100 |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2016-11-22 16:45:46 +0000 |
commit | 852801417a89375c0df4285e60d90c7821a1d730 (patch) | |
tree | e4f266309fd9b5b06634bfde9cee2da44346d8a8 /sound | |
parent | 1001354ca34179f3db924eb66672442a173147dc (diff) | |
download | linux-852801417a89375c0df4285e60d90c7821a1d730.tar.bz2 |
ASoC: Make return type of dpcm_state_string() const char *
dpcm_state_string() returns a pointer to a string literal. Modifying a
string literal causes undefined behaviour. So make the return type of the
function const char * to make it explicit that the returned value should
not be modified.
This patch is purely cosmetic, none of the users of dpcm_state_string()
attempt to modify the returned content.
Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'sound')
-rw-r--r-- | sound/soc/soc-pcm.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/sound/soc/soc-pcm.c b/sound/soc/soc-pcm.c index d56a16a0f6fa..e7a1eaa2772f 100644 --- a/sound/soc/soc-pcm.c +++ b/sound/soc/soc-pcm.c @@ -2882,7 +2882,7 @@ int snd_soc_platform_trigger(struct snd_pcm_substream *substream, EXPORT_SYMBOL_GPL(snd_soc_platform_trigger); #ifdef CONFIG_DEBUG_FS -static char *dpcm_state_string(enum snd_soc_dpcm_state state) +static const char *dpcm_state_string(enum snd_soc_dpcm_state state) { switch (state) { case SND_SOC_DPCM_STATE_NEW: |