libfdt: add fdt_get_property_namelen_w()

Similar to the non-namelen variant, it is implemented in terms of
fdt_get_property_namelen()

Reviewed-by: David Gibson <david@gibson.dropbear.id.au>
Signed-off-by: Ayush Singh <ayush@beagleboard.org>
Message-ID: <20241205-setprop-namelen-v2-1-0d85a3d2e7b1@beagleboard.org>
Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
This commit is contained in:
Ayush Singh 2024-12-05 10:21:03 +05:30 committed by David Gibson
parent 1e8c5f60e1
commit 56b2b30c5b

View file

@ -712,6 +712,13 @@ const struct fdt_property *fdt_get_property_namelen(const void *fdt,
int nodeoffset, int nodeoffset,
const char *name, const char *name,
int namelen, int *lenp); int namelen, int *lenp);
static inline struct fdt_property *
fdt_get_property_namelen_w(void *fdt, int nodeoffset, const char *name,
int namelen, int *lenp)
{
return (struct fdt_property *)(uintptr_t)fdt_get_property_namelen(
fdt, nodeoffset, name, namelen, lenp);
}
#endif #endif
/** /**