projects
/
firefly-linux-kernel-4.4.55.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
556889a
)
bvme6000-rtc: BKL pushdown
author
Arnd Bergmann
<arnd@arndb.de>
Tue, 20 May 2008 17:15:42 +0000
(19:15 +0200)
committer
Jonathan Corbet
<corbet@lwn.net>
Fri, 20 Jun 2008 20:05:55 +0000
(14:05 -0600)
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
arch/m68k/bvme6000/rtc.c
patch
|
blob
|
history
diff --git
a/arch/m68k/bvme6000/rtc.c
b/arch/m68k/bvme6000/rtc.c
index a812d03879f891b8e69501f13b2c410ae7241b01..e8ac3f7d72df6dd457aded95444e69655d16f7c1 100644
(file)
--- a/
arch/m68k/bvme6000/rtc.c
+++ b/
arch/m68k/bvme6000/rtc.c
@@
-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;
}