From: Sebastian Reichel <s...@kernel.org>

Introduce signed 32bit integer of_property_read method.

Signed-off-by: Sebastian Reichel <s...@kernel.org>
Signed-off-by: Grant Likely <grant.lik...@linaro.org>
Signed-off-by: Marc Kleine-Budde <m...@pengutronix.de>
Signed-off-by: Stefan Kerkmann <s.kerkm...@pengutronix.de>
---
 include/of.h | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/include/of.h b/include/of.h
index 9cd2c9aee2..9eef6d7f13 100644
--- a/include/of.h
+++ b/include/of.h
@@ -1138,6 +1138,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);
+}
+
 /**
  * of_property_read_u64_array - Find and read an array of 64 bit integers
  * from a property.

-- 
2.39.2


Reply via email to