diff options
author | Arnd Bergmann <arnd@arndb.de> | 2008-05-20 19:16:22 +0200 |
---|---|---|
committer | Jonathan Corbet <corbet@lwn.net> | 2008-07-02 15:06:23 -0600 |
commit | e3e8e59dcd63621e3ade03083c17b6363a8e2dc8 (patch) | |
tree | 696f8d6eb20d7b6f00a5ec72d3c41bd4941913c7 /arch/m68k | |
parent | f9c8154f367d471f1af56742fe8534f8458adb98 (diff) | |
download | kernel_samsung_smdk4412-e3e8e59dcd63621e3ade03083c17b6363a8e2dc8.zip kernel_samsung_smdk4412-e3e8e59dcd63621e3ade03083c17b6363a8e2dc8.tar.gz kernel_samsung_smdk4412-e3e8e59dcd63621e3ade03083c17b6363a8e2dc8.tar.bz2 |
mvme16x-rtc: BKL pushdown
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Diffstat (limited to 'arch/m68k')
-rw-r--r-- | arch/m68k/mvme16x/rtc.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/arch/m68k/mvme16x/rtc.c b/arch/m68k/mvme16x/rtc.c index e341387..432a9f1 100644 --- a/arch/m68k/mvme16x/rtc.c +++ b/arch/m68k/mvme16x/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> @@ -127,11 +128,14 @@ static int rtc_ioctl(struct inode *inode, struct file *file, unsigned int cmd, static int rtc_open(struct inode *inode, struct file *file) { + lock_kernel(); if( !atomic_dec_and_test(&rtc_ready) ) { atomic_inc( &rtc_ready ); + unlock_kernel(); return -EBUSY; } + unlock_kernel(); return 0; } |