summaryrefslogtreecommitdiffstats
path: root/include/sound/soc-component.h
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 /include/sound/soc-component.h
parente92a309be437b761c6972502386ea717c6fed027 (diff)
downloadlinux-933f98be60a7b9c287acb081fb5d6659dd5e0441.tar.bz2
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 'include/sound/soc-component.h')
-rw-r--r--include/sound/soc-component.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/include/sound/soc-component.h b/include/sound/soc-component.h
index 5b47768222b7..7dc75b39287f 100644
--- a/include/sound/soc-component.h
+++ b/include/sound/soc-component.h
@@ -101,7 +101,7 @@ struct snd_soc_component_driver {
/* DT */
int (*of_xlate_dai_name)(struct snd_soc_component *component,
- struct of_phandle_args *args,
+ const struct of_phandle_args *args,
const char **dai_name);
int (*of_xlate_dai_id)(struct snd_soc_component *comment,
struct device_node *endpoint);
@@ -450,7 +450,7 @@ void snd_soc_component_remove(struct snd_soc_component *component);
int snd_soc_component_of_xlate_dai_id(struct snd_soc_component *component,
struct device_node *ep);
int snd_soc_component_of_xlate_dai_name(struct snd_soc_component *component,
- struct of_phandle_args *args,
+ const struct of_phandle_args *args,
const char **dai_name);
int snd_soc_component_compr_open(struct snd_compr_stream *cstream);
void snd_soc_component_compr_free(struct snd_compr_stream *cstream,