Commit 7bcc3209 authored by Arnd Bergmann's avatar Arnd Bergmann Committed by Jonathan Corbet

openprom: BKL pushdown

Signed-off-by: default avatarArnd Bergmann <arnd@arndb.de>
parent b7fdf9fd
...@@ -33,6 +33,7 @@ ...@@ -33,6 +33,7 @@
#include <linux/kernel.h> #include <linux/kernel.h>
#include <linux/errno.h> #include <linux/errno.h>
#include <linux/slab.h> #include <linux/slab.h>
#include <linux/smp_lock.h>
#include <linux/string.h> #include <linux/string.h>
#include <linux/miscdevice.h> #include <linux/miscdevice.h>
#include <linux/init.h> #include <linux/init.h>
...@@ -689,9 +690,11 @@ static int openprom_open(struct inode * inode, struct file * file) ...@@ -689,9 +690,11 @@ static int openprom_open(struct inode * inode, struct file * file)
if (!data) if (!data)
return -ENOMEM; return -ENOMEM;
lock_kernel();
data->current_node = of_find_node_by_path("/"); data->current_node = of_find_node_by_path("/");
data->lastnode = data->current_node; data->lastnode = data->current_node;
file->private_data = (void *) data; file->private_data = (void *) data;
unlock_kernel();
return 0; return 0;
} }
......
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