Thread (1 message) 1 message, 1 author, 2016-07-29

[PATCH v5 4/8] libfdt: Add fdt_getprop_namelen_w

DORMANTno replies REVIEWED: 1 (0M)

From: Maxime Ripard <hidden>
Date: 2016-07-29 09:55:47
Subsystem: the rest · Maintainer: Linus Torvalds

1 review trailer.

Add a function to retrieve a writeable property only by the first
characters of its name.

Reviewed-by: David Gibson <redacted>
Signed-off-by: Maxime Ripard <maxime.ripard-wi1+55ScJUtKEb57/3fJTNBPR1lH4CV8@public.gmane.org>
---
 libfdt/libfdt.h | 7 +++++++
 1 file changed, 7 insertions(+)
diff --git a/libfdt/libfdt.h b/libfdt/libfdt.h
index 06b84cc16bbf..0189350fb32f 100644
--- a/libfdt/libfdt.h
+++ b/libfdt/libfdt.h
@@ -629,6 +629,13 @@ const void *fdt_getprop_by_offset(const void *fdt, int offset,
  */
 const void *fdt_getprop_namelen(const void *fdt, int nodeoffset,
 				const char *name, int namelen, int *lenp);
+static inline void *fdt_getprop_namelen_w(void *fdt, int nodeoffset,
+					  const char *name, int namelen,
+					  int *lenp)
+{
+	return (void *)(uintptr_t)fdt_getprop_namelen(fdt, nodeoffset, name,
+						      namelen, lenp);
+}
 
 /**
  * fdt_getprop - retrieve the value of a given property
-- 
2.9.2

--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help