diff options
author | Sylwester Nawrocki <s.nawrocki@samsung.com> | 2014-06-16 10:33:46 -0400 |
---|---|---|
committer | Mark Brown <broonie@linaro.org> | 2014-08-16 18:02:54 -0400 |
commit | 8ad9f9efcc7656cafb56bbbcd545f817a742bf32 (patch) | |
tree | d0241e89fd99678b660c54a98decc2b5556b318a /include/sound | |
parent | 7d1311b93e58ed55f3a31cc8f94c4b8fe988a2b9 (diff) |
ASoC: Drop const from struct snd_soc_dai_link *of_node members
Dropping the const qualifiers prevents "passing argument 1 of ‘of_node_put’
discards ‘const’ qualifier from pointer target type" type warnings when
compiling the code dropping reference to cpu_of_node, codec_of_node or
platform_of_node with with an of_node_put() function call.
This lets us to avoid casting to struct device_node * or caching variables
internally in drivers just to be able to properly drop a reference to the
OF node on clean up paths.
Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
Signed-off-by: Mark Brown <broonie@linaro.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 be6ecae247b0..fd58371c63ff 100644 --- a/include/sound/soc.h +++ b/include/sound/soc.h | |||
@@ -897,7 +897,7 @@ struct snd_soc_dai_link { | |||
897 | * only for codec to codec links, or systems using device tree. | 897 | * only for codec to codec links, or systems using device tree. |
898 | */ | 898 | */ |
899 | const char *cpu_name; | 899 | const char *cpu_name; |
900 | const struct device_node *cpu_of_node; | 900 | struct device_node *cpu_of_node; |
901 | /* | 901 | /* |
902 | * You MAY specify the DAI name of the CPU DAI. If this information is | 902 | * You MAY specify the DAI name of the CPU DAI. If this information is |
903 | * omitted, the CPU-side DAI is matched using .cpu_name/.cpu_of_node | 903 | * omitted, the CPU-side DAI is matched using .cpu_name/.cpu_of_node |
@@ -909,7 +909,7 @@ struct snd_soc_dai_link { | |||
909 | * DT/OF node, but not both. | 909 | * DT/OF node, but not both. |
910 | */ | 910 | */ |
911 | const char *codec_name; | 911 | const char *codec_name; |
912 | const struct device_node *codec_of_node; | 912 | struct device_node *codec_of_node; |
913 | /* You MUST specify the DAI name within the codec */ | 913 | /* You MUST specify the DAI name within the codec */ |
914 | const char *codec_dai_name; | 914 | const char *codec_dai_name; |
915 | 915 | ||
@@ -922,7 +922,7 @@ struct snd_soc_dai_link { | |||
922 | * do not need a platform. | 922 | * do not need a platform. |
923 | */ | 923 | */ |
924 | const char *platform_name; | 924 | const char *platform_name; |
925 | const struct device_node *platform_of_node; | 925 | struct device_node *platform_of_node; |
926 | int be_id; /* optional ID for machine driver BE identification */ | 926 | int be_id; /* optional ID for machine driver BE identification */ |
927 | 927 | ||
928 | const struct snd_soc_pcm_stream *params; | 928 | const struct snd_soc_pcm_stream *params; |