Commit 09de3613 authored by Arnd Bergmann's avatar Arnd Bergmann Committed by Jonathan Corbet

sparc64-rtc: BKL pushdown

Signed-off-by: default avatarArnd Bergmann <arnd@arndb.de>
parent ee30d64e
...@@ -11,6 +11,7 @@ ...@@ -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, ...@@ -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;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment