diff options
author | Mike Ditto <mditto@consentry.com> | 2008-10-21 11:32:29 +0000 |
---|---|---|
committer | Benjamin Herrenschmidt <benh@kernel.crashing.org> | 2008-10-22 15:01:21 +1100 |
commit | 71773f0337bee8a3701aaaec22581c18a5f44679 (patch) | |
tree | 06ff80057f216d0515b027b963af8a926dca8955 /arch/powerpc/boot/ops.h | |
parent | 201bdc868d9e3122bbe4491aa6b5fc4dee4cdb96 (diff) | |
download | linux-71773f0337bee8a3701aaaec22581c18a5f44679.tar.bz2 |
powerpc: Add del_node() for early boot code to prune inapplicable devices.
Some platforms have variants that can share most of a flat device tree but need
a few devices selectively pruned at boot time. This adds del_node() to ops.h
to allow access to the existing fdt_del_node().
Signed-off-by: Mike Ditto <mditto@consentry.com>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Diffstat (limited to 'arch/powerpc/boot/ops.h')
-rw-r--r-- | arch/powerpc/boot/ops.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/arch/powerpc/boot/ops.h b/arch/powerpc/boot/ops.h index 321e2f5afe71..b3218ce451bb 100644 --- a/arch/powerpc/boot/ops.h +++ b/arch/powerpc/boot/ops.h @@ -40,6 +40,7 @@ struct dt_ops { const int buflen); int (*setprop)(const void *phandle, const char *name, const void *buf, const int buflen); + int (*del_node)(const void *phandle); void *(*get_parent)(const void *phandle); /* The node must not already exist. */ void *(*create_node)(const void *parent, const char *name); @@ -126,6 +127,11 @@ static inline int setprop_str(void *devp, const char *name, const char *buf) return -1; } +static inline int del_node(const void *devp) +{ + return dt_ops.del_node ? dt_ops.del_node(devp) : -1; +} + static inline void *get_parent(const char *devp) { return dt_ops.get_parent ? dt_ops.get_parent(devp) : NULL; |