summaryrefslogtreecommitdiff
path: root/sound/soc/soc-core.c
diff options
context:
space:
mode:
authorJyri Sarha <jsarha@ti.com>2015-09-17 13:13:38 +0300
committerMark Brown <broonie@kernel.org>2015-09-17 13:36:05 +0300
commit6c84e5917f83334f9196a50cfa31e72207b1a7f6 (patch)
tree31e7f0cd198916f745fc7b5cf48ac0574a5daf18 /sound/soc/soc-core.c
parent6131084a0bc966107021d8c89489f9cd1663b902 (diff)
downloadlinux-6c84e5917f83334f9196a50cfa31e72207b1a7f6.tar.xz
ASoC: soc-core: Fix sparse warning in be32_to_cpup() call
Store return value of of_get_property() to a pointer of __be32 type as device tree has big endian type. This fixes a sparse warning couple of lines later when be32_to_cpup() is used to convert from big endian to cpu endian. The whole conversion is not really necessary, as we are only checking if the value is zero or not, but I wanted to add it to remind in the future that the data has to be converted before use. Compiler should optimize the unnecessary operations away. Signed-off-by: Jyri Sarha <jsarha@ti.com> 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 c5e21ca0c015..3b471f9c98c6 100644
--- a/sound/soc/soc-core.c
+++ b/sound/soc/soc-core.c
@@ -3296,7 +3296,7 @@ static int snd_soc_of_get_slot_mask(struct device_node *np,
unsigned int *mask)
{
u32 val;
- const u32 *of_slot_mask = of_get_property(np, prop_name, &val);
+ const __be32 *of_slot_mask = of_get_property(np, prop_name, &val);
int i;
if (!of_slot_mask)