aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/sbus/char
diff options
context:
space:
mode:
authorArnd Bergmann <arnd@arndb.de>2008-05-20 13:16:29 -0400
committerJonathan Corbet <corbet@lwn.net>2008-07-02 17:06:24 -0400
commit7bcc3209be82d69361a944c57caeb548b35c7f04 (patch)
tree0f902d364c7b16a5d8ca14c6ab59ec14870cee46 /drivers/sbus/char
parentb7fdf9fdd6457c9ed02099fe82bab92b0b3e291b (diff)
openprom: BKL pushdown
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Diffstat (limited to 'drivers/sbus/char')
-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 @@
33#include <linux/kernel.h> 33#include <linux/kernel.h>
34#include <linux/errno.h> 34#include <linux/errno.h>
35#include <linux/slab.h> 35#include <linux/slab.h>
36#include <linux/smp_lock.h>
36#include <linux/string.h> 37#include <linux/string.h>
37#include <linux/miscdevice.h> 38#include <linux/miscdevice.h>
38#include <linux/init.h> 39#include <linux/init.h>
@@ -689,9 +690,11 @@ static int openprom_open(struct inode * inode, struct file * file)
689 if (!data) 690 if (!data)
690 return -ENOMEM; 691 return -ENOMEM;
691 692
693 lock_kernel();
692 data->current_node = of_find_node_by_path("/"); 694 data->current_node = of_find_node_by_path("/");
693 data->lastnode = data->current_node; 695 data->lastnode = data->current_node;
694 file->private_data = (void *) data; 696 file->private_data = (void *) data;
697 unlock_kernel();
695 698
696 return 0; 699 return 0;
697} 700}