sparc64-rtc: BKL pushdown
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
This commit is contained in:
parent
ee30d64e42
commit
09de36137c
1 changed files with 6 additions and 1 deletions
|
@ -11,6 +11,7 @@
|
||||||
#include <linux/errno.h>
|
#include <linux/errno.h>
|
||||||
#include <linux/module.h>
|
#include <linux/module.h>
|
||||||
#include <linux/sched.h>
|
#include <linux/sched.h>
|
||||||
|
#include <linux/smp_lock.h>
|
||||||
#include <linux/kernel.h>
|
#include <linux/kernel.h>
|
||||||
#include <linux/param.h>
|
#include <linux/param.h>
|
||||||
#include <linux/string.h>
|
#include <linux/string.h>
|
||||||
|
@ -1659,10 +1660,14 @@ static int mini_rtc_ioctl(struct inode *inode, struct file *file,
|
||||||
|
|
||||||
static int mini_rtc_open(struct inode *inode, struct file *file)
|
static int mini_rtc_open(struct inode *inode, struct file *file)
|
||||||
{
|
{
|
||||||
if (mini_rtc_status & RTC_IS_OPEN)
|
lock_kernel();
|
||||||
|
if (mini_rtc_status & RTC_IS_OPEN) {
|
||||||
|
unlock_kernel();
|
||||||
return -EBUSY;
|
return -EBUSY;
|
||||||
|
}
|
||||||
|
|
||||||
mini_rtc_status |= RTC_IS_OPEN;
|
mini_rtc_status |= RTC_IS_OPEN;
|
||||||
|
unlock_kernel();
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue