Skip to content

Commit e7a00e4

Browse files
sreglikely
authored andcommitted
of: introduce of_property_read_s32
Introduce signed 32bit integer of_property_read method. Signed-off-by: Sebastian Reichel <[email protected]> Signed-off-by: Grant Likely <[email protected]>
1 parent a87fa1d commit e7a00e4

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

include/linux/of.h

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -760,6 +760,13 @@ static inline int of_property_read_u32(const struct device_node *np,
760760
return of_property_read_u32_array(np, propname, out_value, 1);
761761
}
762762

763+
static 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+
763770
#define of_property_for_each_u32(np, propname, prop, p, u) \
764771
for (prop = of_find_property(np, propname, NULL), \
765772
p = of_prop_next_u32(prop, NULL, &u); \

0 commit comments

Comments
 (0)