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@xxxxxxxxxxxxxxxxxx> Reviewed-by: David Gibson <david@xxxxxxxxxxxxxxxxxxxxx> > --- > 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
Attachment:
signature.asc
Description: PGP signature