Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 116966
b: refs/heads/master
c: 71773f0
h: refs/heads/master
v: v3
  • Loading branch information
Mike Ditto authored and Benjamin Herrenschmidt committed Oct 22, 2008
1 parent 8e200e7 commit c0a6237
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 201bdc868d9e3122bbe4491aa6b5fc4dee4cdb96
refs/heads/master: 71773f0337bee8a3701aaaec22581c18a5f44679
6 changes: 6 additions & 0 deletions trunk/arch/powerpc/boot/libfdt-wrapper.c
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,11 @@ static int fdt_wrapper_setprop(const void *devp, const char *name,
return check_err(rc);
}

static int fdt_wrapper_del_node(const void *devp)
{
return fdt_del_node(fdt, devp_offset(devp));
}

static void *fdt_wrapper_get_parent(const void *devp)
{
return offset_devp(fdt_parent_offset(fdt, devp_offset(devp)));
Expand Down Expand Up @@ -174,6 +179,7 @@ void fdt_init(void *blob)
dt_ops.create_node = fdt_wrapper_create_node;
dt_ops.find_node_by_prop_value = fdt_wrapper_find_node_by_prop_value;
dt_ops.find_node_by_compatible = fdt_wrapper_find_node_by_compatible;
dt_ops.del_node = fdt_wrapper_del_node;
dt_ops.get_path = fdt_wrapper_get_path;
dt_ops.finalize = fdt_wrapper_finalize;

Expand Down
6 changes: 6 additions & 0 deletions trunk/arch/powerpc/boot/ops.h
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down Expand Up @@ -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;
Expand Down

0 comments on commit c0a6237

Please sign in to comment.