]> git.baikalelectronics.ru Git - kernel.git/commit
ASoC: soc-core: Fix sparse warning in be32_to_cpup() call
authorJyri Sarha <jsarha@ti.com>
Thu, 17 Sep 2015 10:13:38 +0000 (13:13 +0300)
committerMark Brown <broonie@kernel.org>
Thu, 17 Sep 2015 10:36:05 +0000 (11:36 +0100)
commitec72894957d016ca4eeba3d6653437c728cee825
tree31e7f0cd198916f745fc7b5cf48ac0574a5daf18
parent9f4110b9fa2dd0b6b3ff289e0d39729ce6632cdb
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>
sound/soc/soc-core.c