1
0
Fork 0

bvme6000-rtc: BKL pushdown

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
hifive-unleashed-5.1
Arnd Bergmann 2008-05-20 19:15:42 +02:00 committed by Jonathan Corbet
parent 556889a4ae
commit 122bc5eaf8
1 changed files with 6 additions and 1 deletions

View File

@ -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;
}