summaryrefslogtreecommitdiff
path: root/drivers/sbus/char/openprom.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/sbus/char/openprom.c')
-rw-r--r--drivers/sbus/char/openprom.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/sbus/char/openprom.c b/drivers/sbus/char/openprom.c
index fbfeb89a6f32..29dc735e1a20 100644
--- a/drivers/sbus/char/openprom.c
+++ b/drivers/sbus/char/openprom.c
@@ -33,6 +33,7 @@
#include <linux/kernel.h>
#include <linux/errno.h>
#include <linux/slab.h>
+#include <linux/smp_lock.h>
#include <linux/string.h>
#include <linux/miscdevice.h>
#include <linux/init.h>
@@ -689,9 +690,11 @@ static int openprom_open(struct inode * inode, struct file * file)
if (!data)
return -ENOMEM;
+ lock_kernel();
data->current_node = of_find_node_by_path("/");
data->lastnode = data->current_node;
file->private_data = (void *) data;
+ unlock_kernel();
return 0;
}