diff options
author | Jean-Francois Moine <moinejf@free.fr> | 2014-11-25 06:14:48 -0500 |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2014-11-25 17:26:34 -0500 |
commit | c362effe5cda4df02aa7670d58636ea73979e304 (patch) | |
tree | 3b56baadab2088a02099a4481b02c07ef7eafc19 /include/sound | |
parent | 8e2be56273666614e24756d7ee551203b8a86809 (diff) |
ASoC: Remove 'const' from the device_node pointers
As Russell King's explained it, there should not be pointers to
struct device_node:
"struct device_node is a ref-counted structure. That means if you
store a reference to it, you should "get" it, and you should "put"
it once you've done. The act of "put"ing the pointed-to structure
involves writing to that structure, so it is totally unappropriate
to store a device_node structure as a const pointer. It forces you
to have to cast it back to a non-const pointer at various points
in time to use various OF function calls."
[This isn't quite the application here, we're not geting or putting the
pointer though we did add some other users who call non-const OF
functions -- broonie]
Signed-off-by: Jean-Francois Moine <moinejf@free.fr>
Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'include/sound')
-rw-r--r-- | include/sound/soc.h | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/include/sound/soc.h b/include/sound/soc.h index edbb07ba4cb5..d1f3dac91b3e 100644 --- a/include/sound/soc.h +++ b/include/sound/soc.h | |||
@@ -881,7 +881,7 @@ struct snd_soc_platform_driver { | |||
881 | 881 | ||
882 | struct snd_soc_dai_link_component { | 882 | struct snd_soc_dai_link_component { |
883 | const char *name; | 883 | const char *name; |
884 | const struct device_node *of_node; | 884 | struct device_node *of_node; |
885 | const char *dai_name; | 885 | const char *dai_name; |
886 | }; | 886 | }; |
887 | 887 | ||
@@ -983,7 +983,7 @@ struct snd_soc_codec_conf { | |||
983 | * DT/OF node, but not both. | 983 | * DT/OF node, but not both. |
984 | */ | 984 | */ |
985 | const char *dev_name; | 985 | const char *dev_name; |
986 | const struct device_node *of_node; | 986 | struct device_node *of_node; |
987 | 987 | ||
988 | /* | 988 | /* |
989 | * optional map of kcontrol, widget and path name prefixes that are | 989 | * optional map of kcontrol, widget and path name prefixes that are |
@@ -1000,7 +1000,7 @@ struct snd_soc_aux_dev { | |||
1000 | * DT/OF node, but not both. | 1000 | * DT/OF node, but not both. |
1001 | */ | 1001 | */ |
1002 | const char *codec_name; | 1002 | const char *codec_name; |
1003 | const struct device_node *codec_of_node; | 1003 | struct device_node *codec_of_node; |
1004 | 1004 | ||
1005 | /* codec/machine specific init - e.g. add machine controls */ | 1005 | /* codec/machine specific init - e.g. add machine controls */ |
1006 | int (*init)(struct snd_soc_component *component); | 1006 | int (*init)(struct snd_soc_component *component); |