提交 122bc5ea 编写于 作者: A Arnd Bergmann 提交者: Jonathan Corbet

bvme6000-rtc: BKL pushdown

Signed-off-by: NArnd Bergmann <arnd@arndb.de>
上级 556889a4
......@@ -10,6 +10,7 @@
#include <linux/errno.h>
#include <linux/miscdevice.h>
#include <linux/slab.h>
#include <linux/smp_lock.h>
#include <linux/ioport.h>
#include <linux/capability.h>
#include <linux/fcntl.h>
......@@ -140,10 +141,14 @@ static int rtc_ioctl(struct inode *inode, struct file *file, unsigned int cmd,
static int rtc_open(struct inode *inode, struct file *file)
{
if(rtc_status)
lock_kernel();
if(rtc_status) {
unlock_kernel();
return -EBUSY;
}
rtc_status = 1;
unlock_kernel();
return 0;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册