sbus-rtc: BKL pushdown
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
This commit is contained in:
parent
4101273535
commit
5ab0854dd7
1 changed files with 3 additions and 0 deletions
|
@ -12,6 +12,7 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <linux/module.h>
|
#include <linux/module.h>
|
||||||
|
#include <linux/smp_lock.h>
|
||||||
#include <linux/types.h>
|
#include <linux/types.h>
|
||||||
#include <linux/errno.h>
|
#include <linux/errno.h>
|
||||||
#include <linux/miscdevice.h>
|
#include <linux/miscdevice.h>
|
||||||
|
@ -213,6 +214,7 @@ static int rtc_open(struct inode *inode, struct file *file)
|
||||||
{
|
{
|
||||||
int ret;
|
int ret;
|
||||||
|
|
||||||
|
lock_kernel();
|
||||||
spin_lock_irq(&mostek_lock);
|
spin_lock_irq(&mostek_lock);
|
||||||
if (rtc_busy) {
|
if (rtc_busy) {
|
||||||
ret = -EBUSY;
|
ret = -EBUSY;
|
||||||
|
@ -221,6 +223,7 @@ static int rtc_open(struct inode *inode, struct file *file)
|
||||||
ret = 0;
|
ret = 0;
|
||||||
}
|
}
|
||||||
spin_unlock_irq(&mostek_lock);
|
spin_unlock_irq(&mostek_lock);
|
||||||
|
unlock_kernel();
|
||||||
|
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue