===================================================================
@@ -19,6 +19,7 @@
#include <linux/bitops.h>
#include <linux/kref.h>
#include <linux/mod_devicetable.h>
+#include <linux/spinlock.h>
typedef u32 phandle;
typedef u32 ihandle;
@@ -63,6 +64,9 @@
#endif
};
+extern rwlock_t devtree_lock;
+extern struct device_node *allnodes;
+
static inline int of_node_check_flag(struct device_node *n, unsigned long flag)
{
return test_bit(flag, &n->_flags);
===================================================================
@@ -32,6 +32,7 @@
#include <linux/debugfs.h>
#include <linux/irq.h>
#include <linux/lmb.h>
+#include <linux/of.h>
#include <asm/prom.h>
#include <asm/rtas.h>
@@ -79,10 +80,6 @@
struct boot_param_header *initial_boot_params;
#endif
-extern struct device_node *allnodes; /* temporary while merging */
-
-extern rwlock_t devtree_lock; /* temporary while merging */
-
/* export that to outside world */
struct device_node *of_chosen;
===================================================================
@@ -23,6 +23,7 @@
#include <linux/of_fdt.h>
#include <linux/proc_fs.h>
#include <linux/platform_device.h>
+#include <linux/of.h>
#include <asm/irq.h>
#include <asm/atomic.h>
@@ -37,9 +38,6 @@
#define HAVE_ARCH_DEVTREE_FIXUPS
-extern struct device_node *allnodes; /* temporary while merging */
-extern rwlock_t devtree_lock; /* temporary while merging */
-
/* For updating the device tree at runtime */
extern void of_attach_node(struct device_node *);
extern void of_detach_node(struct device_node *);
===================================================================
@@ -2,11 +2,9 @@
#define __PROM_H
#include <linux/spinlock.h>
+#include <linux/of.h>
#include <asm/prom.h>
-extern struct device_node *allnodes; /* temporary while merging */
-extern rwlock_t devtree_lock; /* temporary while merging */
-
extern void * prom_early_alloc(unsigned long size);
extern void irq_trans_init(struct device_node *dp);
Move the declaration of devtree_lock and allnodes from powerpc/microblaze asm/prom.h to linux/of.h Signed-off-by: Nathan Fontenot <nfont@austin.ibm.com> ---