Thread (11 messages) 11 messages, 4 authors, 2016-09-27
STALE3537d
Revisions (2)
  1. v1 [diff vs current]
  2. v2 current

[PATCH v2 2/4] of: introduce of_property_read_s32_index

From: Finlye Xiao <hidden>
Date: 2016-08-18 09:00:09
Also in: linux-devicetree, linux-pm, linux-rockchip, lkml
Subsystem: open firmware and flattened device tree, the rest · Maintainers: Rob Herring, Saravana Kannan, Linus Torvalds

From: Finley Xiao <redacted>

Introduce single indexed signed 32bit integer of_property_read method.

Signed-off-by: Finley Xiao <redacted>
---
 include/linux/of.h | 8 ++++++++
 1 file changed, 8 insertions(+)
diff --git a/include/linux/of.h b/include/linux/of.h
index 3d9ff8e..8ef775e 100644
--- a/include/linux/of.h
+++ b/include/linux/of.h
@@ -929,6 +929,14 @@ static inline int of_property_read_s32(const struct device_node *np,
 	return of_property_read_u32(np, propname, (u32*) out_value);
 }
 
+static inline int of_property_read_s32_index(const struct device_node *np,
+					     const char *propname, u32 index,
+					     s32 *out_value)
+{
+	return of_property_read_u32_index(np, propname, index,
+		(u32 *)out_value);
+}
+
 #define of_for_each_phandle(it, err, np, ln, cn, cc)			\
 	for (of_phandle_iterator_init((it), (np), (ln), (cn), (cc)),	\
 	     err = of_phandle_iterator_next(it);			\
-- 
1.9.1
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help