aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/of.h
diff options
context:
space:
mode:
authorSebastian Reichel <sre@kernel.org>2014-04-06 06:52:11 -0400
committerGrant Likely <grant.likely@linaro.org>2014-11-04 08:29:36 -0500
commite7a00e4210e4cc980e3ba67ec7301af54061d14b (patch)
treeefb5872501dac80f653e89e0c9287bfdeae59d9c /include/linux/of.h
parenta87fa1d81a9fb5e9adca9820e16008c40ad09f33 (diff)
of: introduce of_property_read_s32
Introduce signed 32bit integer of_property_read method. Signed-off-by: Sebastian Reichel <sre@kernel.org> Signed-off-by: Grant Likely <grant.likely@linaro.org>
Diffstat (limited to 'include/linux/of.h')
-rw-r--r--include/linux/of.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/include/linux/of.h b/include/linux/of.h
index 29f0adc5f3e4..30912939a610 100644
--- a/include/linux/of.h
+++ b/include/linux/of.h
@@ -760,6 +760,13 @@ static inline int of_property_read_u32(const struct device_node *np,
760 return of_property_read_u32_array(np, propname, out_value, 1); 760 return of_property_read_u32_array(np, propname, out_value, 1);
761} 761}
762 762
763static inline int of_property_read_s32(const struct device_node *np,
764 const char *propname,
765 s32 *out_value)
766{
767 return of_property_read_u32(np, propname, (u32*) out_value);
768}
769
763#define of_property_for_each_u32(np, propname, prop, p, u) \ 770#define of_property_for_each_u32(np, propname, prop, p, u) \
764 for (prop = of_find_property(np, propname, NULL), \ 771 for (prop = of_find_property(np, propname, NULL), \
765 p = of_prop_next_u32(prop, NULL, &u); \ 772 p = of_prop_next_u32(prop, NULL, &u); \