Skip to content
Commit ad54a0cf authored by Heiko Stuebner's avatar Heiko Stuebner Committed by Mark Brown
Browse files

of: add functions to count number of elements in a property



The need to know the number of array elements in a property is
a common pattern. To prevent duplication of open-coded implementations
add a helper static function that also centralises strict sanity
checking and DTB format details, as well as a set of wrapper functions
for u8, u16, u32 and u64.

Suggested-by: default avatarMark Rutland <mark.rutland@arm.com>
Signed-off-by: default avatarHeiko Stuebner <heiko.stuebner@bqreaders.com>
Acked-by: default avatarRob Herring <robh@kernel.org>
Acked-by: default avatarGrant Likely <grant.likely@linaro.org>
Acked-by: default avatarMark Rutland <mark.rutland@arm.com>
Signed-off-by: default avatarMark Brown <broonie@linaro.org>
parent 38dbfb59
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment