Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 62181
b: refs/heads/master
c: e679c5f
h: refs/heads/master
i:
  62179: 65e6c19
v: v3
  • Loading branch information
Stephen Rothwell committed Jul 20, 2007
1 parent 220f946 commit 7ef90b3
Show file tree
Hide file tree
Showing 7 changed files with 40 additions and 48 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: 581b605a83ec241a2aff8ef780e08b9414c8dfd8
refs/heads/master: e679c5f445fe142940e0962de9c5c82f10d9357c
21 changes: 0 additions & 21 deletions trunk/arch/powerpc/kernel/prom.c
Original file line number Diff line number Diff line change
Expand Up @@ -1240,27 +1240,6 @@ struct device_node *of_find_all_nodes(struct device_node *prev)
}
EXPORT_SYMBOL(of_find_all_nodes);

/**
* of_get_parent - Get a node's parent if any
* @node: Node to get parent
*
* Returns a node pointer with refcount incremented, use
* of_node_put() on it when done.
*/
struct device_node *of_get_parent(const struct device_node *node)
{
struct device_node *np;

if (!node)
return NULL;

read_lock(&devtree_lock);
np = of_node_get(node->parent);
read_unlock(&devtree_lock);
return np;
}
EXPORT_SYMBOL(of_get_parent);

/**
* of_get_next_child - Iterate a node childs
* @node: parent node
Expand Down
13 changes: 0 additions & 13 deletions trunk/arch/sparc/kernel/prom.c
Original file line number Diff line number Diff line change
Expand Up @@ -29,19 +29,6 @@ static struct device_node *allnodes;

extern rwlock_t devtree_lock; /* temporary while merging */

struct device_node *of_get_parent(const struct device_node *node)
{
struct device_node *np;

if (!node)
return NULL;

np = node->parent;

return np;
}
EXPORT_SYMBOL(of_get_parent);

struct device_node *of_get_next_child(const struct device_node *node,
struct device_node *prev)
{
Expand Down
13 changes: 0 additions & 13 deletions trunk/arch/sparc64/kernel/prom.c
Original file line number Diff line number Diff line change
Expand Up @@ -34,19 +34,6 @@ static struct device_node *allnodes;

extern rwlock_t devtree_lock; /* temporary while merging */

struct device_node *of_get_parent(const struct device_node *node)
{
struct device_node *np;

if (!node)
return NULL;

np = node->parent;

return np;
}
EXPORT_SYMBOL(of_get_parent);

struct device_node *of_get_next_child(const struct device_node *node,
struct device_node *prev)
{
Expand Down
21 changes: 21 additions & 0 deletions trunk/drivers/of/base.c
Original file line number Diff line number Diff line change
Expand Up @@ -113,3 +113,24 @@ int of_device_is_compatible(const struct device_node *device,
return 0;
}
EXPORT_SYMBOL(of_device_is_compatible);

/**
* of_get_parent - Get a node's parent if any
* @node: Node to get parent
*
* Returns a node pointer with refcount incremented, use
* of_node_put() on it when done.
*/
struct device_node *of_get_parent(const struct device_node *node)
{
struct device_node *np;

if (!node)
return NULL;

read_lock(&devtree_lock);
np = of_node_get(node->parent);
read_unlock(&devtree_lock);
return np;
}
EXPORT_SYMBOL(of_get_parent);
9 changes: 9 additions & 0 deletions trunk/include/asm-sparc/prom.h
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,15 @@ extern int of_getintprop_default(struct device_node *np,

extern void prom_build_devicetree(void);

/* Dummy ref counting routines - to be implemented later */
static inline struct device_node *of_node_get(struct device_node *node)
{
return node;
}
static inline void of_node_put(struct device_node *node)
{
}

/*
* NB: This is here while we transition from using asm/prom.h
* to linux/of.h
Expand Down
9 changes: 9 additions & 0 deletions trunk/include/asm-sparc64/prom.h
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,15 @@ extern int of_getintprop_default(struct device_node *np,

extern void prom_build_devicetree(void);

/* Dummy ref counting routines - to be implemented later */
static inline struct device_node *of_node_get(struct device_node *node)
{
return node;
}
static inline void of_node_put(struct device_node *node)
{
}

/*
* NB: This is here while we transition from using asm/prom.h
* to linux/of.h
Expand Down

0 comments on commit 7ef90b3

Please sign in to comment.