of: introduce of_property_read_s32
authorSebastian Reichel <sre@kernel.org>
Sun, 6 Apr 2014 10:52:11 +0000 (12:52 +0200)
committerGrant Likely <grant.likely@linaro.org>
Tue, 4 Nov 2014 13:29:36 +0000 (13:29 +0000)
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>
include/linux/of.h

index 29f0adc5f3e47e7c97c4e3aed816437ea9a4fa17..30912939a6100904c88e317be2145ffbebbe8c21 100644 (file)
@@ -760,6 +760,13 @@ static inline int of_property_read_u32(const struct device_node *np,
        return of_property_read_u32_array(np, propname, out_value, 1);
 }
 
+static inline int of_property_read_s32(const struct device_node *np,
+                                      const char *propname,
+                                      s32 *out_value)
+{
+       return of_property_read_u32(np, propname, (u32*) out_value);
+}
+
 #define of_property_for_each_u32(np, propname, prop, p, u)     \
        for (prop = of_find_property(np, propname, NULL),       \
                p = of_prop_next_u32(prop, NULL, &u);           \