diff options
author | Arnd Bergmann <arnd@arndb.de> | 2008-05-20 19:15:42 +0200 |
---|---|---|
committer | Jonathan Corbet <corbet@lwn.net> | 2008-06-20 22:05:55 +0200 |
commit | 122bc5eaf81a3870f6cc00d2e5e97f32f92e636b (patch) | |
tree | 71da3dd66fb3438dc01771ca3250b5e279246388 /arch/m68k/bvme6000/rtc.c | |
parent | briq_panel: BKL pushdown (diff) | |
download | linux-122bc5eaf81a3870f6cc00d2e5e97f32f92e636b.tar.xz linux-122bc5eaf81a3870f6cc00d2e5e97f32f92e636b.zip |
bvme6000-rtc: BKL pushdown
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Diffstat (limited to 'arch/m68k/bvme6000/rtc.c')
-rw-r--r-- | arch/m68k/bvme6000/rtc.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/arch/m68k/bvme6000/rtc.c b/arch/m68k/bvme6000/rtc.c index a812d03879f8..e8ac3f7d72df 100644 --- 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; } |