diff options
author | Sebastian Reichel <sre@kernel.org> | 2013-12-09 12:31:31 +0100 |
---|---|---|
committer | Sebastian Reichel <sre@kernel.org> | 2014-04-26 01:48:52 +0200 |
commit | 44281bbe803513c9aef5d0bfb9657f4a84918550 (patch) | |
tree | 786891ce96c231e4b18f05cf1f4b103adb8773c4 | |
parent | 0c053be0402ba7779c0d1f937f6b424d8c5fdd41 (diff) | |
download | linux-44281bbe803513c9aef5d0bfb9657f4a84918550.tar.bz2 |
of: introduce of_property_read_s32
Introduce signed 32bit integer of_property_read method.
Signed-off-by: Sebastian Reichel <sre@kernel.org>
-rw-r--r-- | include/linux/of.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/include/linux/of.h b/include/linux/of.h index 3bad8d106e0e..ba18f08aedd8 100644 --- a/include/linux/of.h +++ b/include/linux/of.h @@ -696,6 +696,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); \ |