Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 60683
b: refs/heads/master
c: d3b814b
h: refs/heads/master
i:
  60681: 5c4a099
  60679: b3e50db
v: v3
  • Loading branch information
Michael Ellerman authored and Paul Mackerras committed Jul 10, 2007
1 parent fc48227 commit 249d51d
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 6 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 972d17c9dbad378da61baa17f4c3ea6e154b186a
refs/heads/master: d3b814bb1e8b0c63449a3430196c20cbe24a3e67
2 changes: 1 addition & 1 deletion trunk/arch/powerpc/kernel/prom.c
Original file line number Diff line number Diff line change
Expand Up @@ -1375,7 +1375,7 @@ static void of_node_release(struct kref *kref)
struct device_node *node = kref_to_device_node(kref);
struct property *prop = node->properties;

if (!OF_IS_DYNAMIC(node))
if (!of_node_check_flag(node, OF_DYNAMIC))
return;
while (prop) {
struct property *next = prop->next;
Expand Down
2 changes: 1 addition & 1 deletion trunk/arch/powerpc/platforms/pseries/reconfig.c
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ static int pSeries_reconfig_add_node(const char *path, struct property *proplist
strcpy(np->full_name, path);

np->properties = proplist;
OF_MARK_DYNAMIC(np);
of_node_set_flag(np, OF_DYNAMIC);
kref_init(&np->kref);

np->parent = derive_parent(path);
Expand Down
14 changes: 11 additions & 3 deletions trunk/include/asm-powerpc/prom.h
Original file line number Diff line number Diff line change
Expand Up @@ -98,10 +98,18 @@ struct device_node {
extern struct device_node *of_chosen;

/* flag descriptions */
#define OF_DYNAMIC 1 /* node and properties were allocated via kmalloc */
#define OF_DYNAMIC 1 /* node and properties were allocated via kmalloc */

static inline int of_node_check_flag(struct device_node *n, unsigned long flag)
{
return test_bit(flag, &n->_flags);
}

static inline void of_node_set_flag(struct device_node *n, unsigned long flag)
{
set_bit(flag, &n->_flags);
}

#define OF_IS_DYNAMIC(x) test_bit(OF_DYNAMIC, &x->_flags)
#define OF_MARK_DYNAMIC(x) set_bit(OF_DYNAMIC, &x->_flags)

#define HAVE_ARCH_DEVTREE_FIXUPS

Expand Down

0 comments on commit 249d51d

Please sign in to comment.