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

Re: [PATCH v2 4/6] libfdt: Add fdt_getprop_namelen_w

From: David Gibson <hidden>
Date: 2016-07-12 02:03:33

On Mon, Jul 11, 2016 at 09:56:21PM +0200, Maxime Ripard wrote:
Add a function to retrieve a writeable property only by the first
characters of its name.

Signed-off-by: Maxime Ripard <maxime.ripard-wi1+55ScJUtKEb57/3fJTNBPR1lH4CV8@public.gmane.org>
Reviewed-by: David Gibson <redacted>
quoted hunk
---
 libfdt/libfdt.h | 7 +++++++
 1 file changed, 7 insertions(+)
diff --git a/libfdt/libfdt.h b/libfdt/libfdt.h
index 812937fede44..1da2c540b607 100644
--- a/libfdt/libfdt.h
+++ b/libfdt/libfdt.h
@@ -622,6 +622,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
-- 
David Gibson			| I'll have my music baroque, and my code
david AT gibson.dropbear.id.au	| minimalist, thank you.  NOT _the_ _other_
				| _way_ _around_!
http://www.ozlabs.org/~dgibson

Attachments

Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help