diff options
-rw-r--r-- | drivers/sbus/char/openprom.c | 3 |
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 | } |