Skip to content

Commit

Permalink
sbus-rtc: BKL pushdown
Browse files Browse the repository at this point in the history
Signed-off-by: Arnd Bergmann <[email protected]>
  • Loading branch information
arndb authored and Jonathan Corbet committed Jul 2, 2008
1 parent 4101273 commit 5ab0854
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions drivers/sbus/char/rtc.c
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
*/

#include <linux/module.h>
#include <linux/smp_lock.h>
#include <linux/types.h>
#include <linux/errno.h>
#include <linux/miscdevice.h>
Expand Down Expand Up @@ -213,6 +214,7 @@ static int rtc_open(struct inode *inode, struct file *file)
{
int ret;

lock_kernel();
spin_lock_irq(&mostek_lock);
if (rtc_busy) {
ret = -EBUSY;
Expand All @@ -221,6 +223,7 @@ static int rtc_open(struct inode *inode, struct file *file)
ret = 0;
}
spin_unlock_irq(&mostek_lock);
unlock_kernel();

return ret;
}
Expand Down

0 comments on commit 5ab0854

Please sign in to comment.