From 56b2b30c5bd0df9d9cf3cdbe8d934e7db9cb8ca9 Mon Sep 17 00:00:00 2001 From: Ayush Singh Date: Thu, 5 Dec 2024 10:21:03 +0530 Subject: [PATCH] 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 Signed-off-by: Ayush Singh Message-ID: <20241205-setprop-namelen-v2-1-0d85a3d2e7b1@beagleboard.org> Signed-off-by: David Gibson --- libfdt/libfdt.h | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/libfdt/libfdt.h b/libfdt/libfdt.h index 2e182ea..7d0c252 100644 --- a/libfdt/libfdt.h +++ b/libfdt/libfdt.h @@ -712,6 +712,13 @@ const struct fdt_property *fdt_get_property_namelen(const void *fdt, int nodeoffset, const char *name, 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 /**