diff options
author | Arnd Bergmann <arnd@arndb.de> | 2008-05-20 19:15:57 +0200 |
---|---|---|
committer | Jonathan Corbet <corbet@lwn.net> | 2008-06-20 22:05:57 +0200 |
commit | 4a7e79a7deab9718d51dc8d3ee938bd0eb789b7b (patch) | |
tree | 88cd99496946bb7871e30db6640c5ab6048c95b9 /drivers/misc/hdpuftrs | |
parent | genrtc: BKL pushdown (diff) | |
download | linux-4a7e79a7deab9718d51dc8d3ee938bd0eb789b7b.tar.xz linux-4a7e79a7deab9718d51dc8d3ee938bd0eb789b7b.zip |
hdpu_cpustate: BKL pushdown
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Diffstat (limited to 'drivers/misc/hdpuftrs')
-rw-r--r-- | drivers/misc/hdpuftrs/hdpu_cpustate.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/drivers/misc/hdpuftrs/hdpu_cpustate.c b/drivers/misc/hdpuftrs/hdpu_cpustate.c index ff51ab67231c..176fe4e09d3f 100644 --- a/drivers/misc/hdpuftrs/hdpu_cpustate.c +++ b/drivers/misc/hdpuftrs/hdpu_cpustate.c @@ -17,6 +17,7 @@ #include <linux/module.h> #include <linux/kernel.h> #include <linux/spinlock.h> +#include <linux/smp_lock.h> #include <linux/miscdevice.h> #include <linux/proc_fs.h> #include <linux/hdpu_features.h> @@ -151,7 +152,13 @@ static ssize_t cpustate_write(struct file *file, const char *buf, static int cpustate_open(struct inode *inode, struct file *file) { - return cpustate_get_ref((file->f_flags & O_EXCL)); + int ret; + + lock_kernel(); + ret = cpustate_get_ref((file->f_flags & O_EXCL)); + unlock_kernel(); + + return ret; } static int cpustate_release(struct inode *inode, struct file *file) |