From: Jerry Van Baren <gvb.uboot@gmail.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH 2/3] fdt: add fdt_del_node_by_path() API
Date: Wed, 09 Dec 2009 21:48:06 -0500 [thread overview]
Message-ID: <4B206166.5040706@gmail.com> (raw)
In-Reply-To: <1260339968-28169-2-git-send-email-leoli@freescale.com>
Hi Li,
Li Yang wrote:
> For removing node easily by path or alias.
>
> Signed-off-by: Li Yang <leoli@freescale.com>
> ---
> common/fdt_support.c | 10 ++++++++++
> include/fdt_support.h | 1 +
> 2 files changed, 11 insertions(+), 0 deletions(-)
>
> diff --git a/common/fdt_support.c b/common/fdt_support.c
> index f89a3ee..8f1186e 100644
> --- a/common/fdt_support.c
> +++ b/common/fdt_support.c
> @@ -757,3 +757,13 @@ int fdt_fixup_nor_flash_size(void *blob, int cs, u32 size)
> return -1;
> }
> #endif
> +
> +int fdt_del_node_by_path(void *fdt, const char *path)
> +{
> + int off = fdt_path_offset(fdt, path);
> +
> + if (off >= 0)
> + return fdt_del_node(fdt, off);
> + else
> + return off;
> +}
> diff --git a/include/fdt_support.h b/include/fdt_support.h
> index 0a9dd0d..d0705d1 100644
> --- a/include/fdt_support.h
> +++ b/include/fdt_support.h
> @@ -80,6 +80,7 @@ void set_working_fdt_addr(void *addr);
> int fdt_resize(void *blob);
>
> int fdt_fixup_nor_flash_size(void *blob, int cs, u32 size);
> +int fdt_del_node_by_path(void *fdt, const char *path);
>
> #endif /* ifdef CONFIG_OF_LIBFDT */
> #endif /* ifndef __FDT_SUPPORT_H */
This seems like a reasonable function, but I don't see it used anywhere?
Best regards,
gvb
next prev parent reply other threads:[~2009-12-10 2:48 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-12-09 6:26 [U-Boot] [PATCH 1/3] Update Makefile for new dirs to be included in tag list Li Yang
2009-12-09 6:26 ` [U-Boot] [PATCH 2/3] fdt: add fdt_del_node_by_path() API Li Yang
2009-12-09 6:26 ` [U-Boot] [PATCH 3/3] fsl_law: add SRIO2 target id and law_size_bits() macro Li Yang
2009-12-10 19:49 ` Kumar Gala
2009-12-10 2:48 ` Jerry Van Baren [this message]
2009-12-10 4:12 ` [U-Boot] [PATCH 2/3] fdt: add fdt_del_node_by_path() API Li Yang-R58472
2009-12-10 6:37 ` Wolfgang Denk
2009-12-10 6:49 ` Li Yang-R58472
2009-12-09 9:12 ` [U-Boot] [PATCH 1/3] Update Makefile for new dirs to be included in tag list Wolfgang Denk
2009-12-09 9:47 ` Li Yang-R58472
2009-12-09 10:28 ` Mike Frysinger
2009-12-09 10:29 ` Mike Frysinger
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4B206166.5040706@gmail.com \
--to=gvb.uboot@gmail.com \
--cc=u-boot@lists.denx.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.