]> pilppa.com Git - linux-2.6-omap-h63xx.git/commitdiff
openprom: BKL pushdown
authorArnd Bergmann <arnd@arndb.de>
Tue, 20 May 2008 17:16:29 +0000 (19:16 +0200)
committerJonathan Corbet <corbet@lwn.net>
Wed, 2 Jul 2008 21:06:24 +0000 (15:06 -0600)
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
drivers/sbus/char/openprom.c

index fbfeb89a6f32d148abbbe9b9c0137d5a7f0fdb10..29dc735e1a20503a69968714c16a43428f1ff7cd 100644 (file)
@@ -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;
 }