Commit 50436312 authored by Grant Likely's avatar Grant Likely

of: merge of_node_*_flag() and set_node_proc_entry()

Merge common code between PowerPC and Microblaze
Signed-off-by: default avatarGrant Likely <grant.likely@secretlab.ca>
Acked-by: default avatarDavid S. Miller <davem@davemloft.net>
Acked-by: default avatarWolfram Sang <w.sang@pengutronix.de>
Acked-by: default avatarMichal Simek <monstr@monstr.eu>
Acked-by: default avatarStephen Neuendorffer <stephen.neuendorffer@xilinx.com>
Acked-by: default avatarStephen Rothwell <sfr@canb.auug.org.au>
parent d45d94f6
...@@ -35,24 +35,8 @@ ...@@ -35,24 +35,8 @@
extern struct device_node *of_chosen; extern struct device_node *of_chosen;
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 HAVE_ARCH_DEVTREE_FIXUPS #define HAVE_ARCH_DEVTREE_FIXUPS
static inline void set_node_proc_entry(struct device_node *dn,
struct proc_dir_entry *de)
{
dn->pde = de;
}
extern struct device_node *allnodes; /* temporary while merging */ extern struct device_node *allnodes; /* temporary while merging */
extern rwlock_t devtree_lock; /* temporary while merging */ extern rwlock_t devtree_lock; /* temporary while merging */
......
...@@ -32,25 +32,8 @@ ...@@ -32,25 +32,8 @@
extern struct device_node *of_chosen; extern struct device_node *of_chosen;
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 HAVE_ARCH_DEVTREE_FIXUPS #define HAVE_ARCH_DEVTREE_FIXUPS
static inline void set_node_proc_entry(struct device_node *dn, struct proc_dir_entry *de)
{
dn->pde = de;
}
extern struct device_node *of_find_all_nodes(struct device_node *prev); extern struct device_node *of_find_all_nodes(struct device_node *prev);
extern struct device_node *of_node_get(struct device_node *node); extern struct device_node *of_node_get(struct device_node *node);
extern void of_node_put(struct device_node *node); extern void of_node_put(struct device_node *node);
......
...@@ -63,6 +63,22 @@ struct device_node { ...@@ -63,6 +63,22 @@ struct device_node {
#endif #endif
}; };
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);
}
static inline void
set_node_proc_entry(struct device_node *dn, struct proc_dir_entry *de)
{
dn->pde = de;
}
#include <asm/prom.h> #include <asm/prom.h>
/* flag descriptions */ /* flag descriptions */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment