Commit e3e8e59d authored by Arnd Bergmann's avatar Arnd Bergmann Committed by Jonathan Corbet

mvme16x-rtc: BKL pushdown

Signed-off-by: default avatarArnd Bergmann <arnd@arndb.de>
parent f9c8154f
...@@ -10,6 +10,7 @@ ...@@ -10,6 +10,7 @@
#include <linux/errno.h> #include <linux/errno.h>
#include <linux/miscdevice.h> #include <linux/miscdevice.h>
#include <linux/slab.h> #include <linux/slab.h>
#include <linux/smp_lock.h>
#include <linux/ioport.h> #include <linux/ioport.h>
#include <linux/capability.h> #include <linux/capability.h>
#include <linux/fcntl.h> #include <linux/fcntl.h>
...@@ -127,11 +128,14 @@ static int rtc_ioctl(struct inode *inode, struct file *file, unsigned int cmd, ...@@ -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) static int rtc_open(struct inode *inode, struct file *file)
{ {
lock_kernel();
if( !atomic_dec_and_test(&rtc_ready) ) if( !atomic_dec_and_test(&rtc_ready) )
{ {
atomic_inc( &rtc_ready ); atomic_inc( &rtc_ready );
unlock_kernel();
return -EBUSY; return -EBUSY;
} }
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