aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/sound/soc/soc-core.c
diff options
context:
space:
mode:
authorKrzysztof Kozlowski <krzk@kernel.org>2021-02-21 16:30:24 +0100
committerMark Brown <broonie@kernel.org>2021-03-10 13:07:14 +0000
commit933f98be60a7b9c287acb081fb5d6659dd5e0441 (patch)
tree7f662329a5262aabad8dd709a89efa5ae42c4693 /sound/soc/soc-core.c
parentMerge series "ASoC: sdm845: array out of bound issues" from Srinivas Kandagatla <srinivas.kandagatla@linaro.org>: (diff)
downloadwireguard-linux-933f98be60a7b9c287acb081fb5d6659dd5e0441.tar.xz
wireguard-linux-933f98be60a7b9c287acb081fb5d6659dd5e0441.zip
ASoC: constify of_phandle_args in snd_soc_get_dai_name()
The pointer to of_phandle_args passed to snd_soc_get_dai_name() and of_xlate_dai_name() implementations is not modified. Since it is being used only to translate passed OF node to a DAI name, it should not be modified, so mark it as const for correctness and safer code. Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org> Link: https://lore.kernel.org/r/20210221153024.453583-1-krzk@kernel.org Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'sound/soc/soc-core.c')
-rw-r--r--sound/soc/soc-core.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/sound/soc/soc-core.c b/sound/soc/soc-core.c
index 0cffc9527e28..16ba54eb8164 100644
--- a/sound/soc/soc-core.c
+++ b/sound/soc/soc-core.c
@@ -2998,7 +2998,7 @@ int snd_soc_get_dai_id(struct device_node *ep)
}
EXPORT_SYMBOL_GPL(snd_soc_get_dai_id);
-int snd_soc_get_dai_name(struct of_phandle_args *args,
+int snd_soc_get_dai_name(const struct of_phandle_args *args,
const char **dai_name)
{
struct snd_soc_component *pos;