From: Arnd Bergmann Date: Tue, 20 May 2008 17:15:57 +0000 (+0200) Subject: hdpu_cpustate: BKL pushdown X-Git-Tag: v2.6.27-rc1~1103^2~61 X-Git-Url: http://pilppa.com/gitweb/?a=commitdiff_plain;h=4a7e79a7deab9718d51dc8d3ee938bd0eb789b7b;p=linux-2.6-omap-h63xx.git hdpu_cpustate: BKL pushdown Signed-off-by: Arnd Bergmann --- diff --git a/drivers/misc/hdpuftrs/hdpu_cpustate.c b/drivers/misc/hdpuftrs/hdpu_cpustate.c index ff51ab67231..176fe4e09d3 100644 --- a/drivers/misc/hdpuftrs/hdpu_cpustate.c +++ b/drivers/misc/hdpuftrs/hdpu_cpustate.c @@ -17,6 +17,7 @@ #include #include #include +#include #include #include #include @@ -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)