diff options
author | Arnd Bergmann <arnd@arndb.de> | 2008-05-20 13:16:50 -0400 |
---|---|---|
committer | Jonathan Corbet <corbet@lwn.net> | 2008-07-02 17:06:25 -0400 |
commit | 09de36137c3794786bc75682c0e1ce45182c1772 (patch) | |
tree | 1f3798f1405dd35b55e998e8174ef58c88783121 | |
parent | ee30d64e42ee1384a81d241b3962d3c1e6174992 (diff) |
sparc64-rtc: BKL pushdown
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
-rw-r--r-- | arch/sparc64/kernel/time.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/arch/sparc64/kernel/time.c b/arch/sparc64/kernel/time.c index e5d238970c7e..bedc4c159b1c 100644 --- a/arch/sparc64/kernel/time.c +++ b/arch/sparc64/kernel/time.c | |||
@@ -11,6 +11,7 @@ | |||
11 | #include <linux/errno.h> | 11 | #include <linux/errno.h> |
12 | #include <linux/module.h> | 12 | #include <linux/module.h> |
13 | #include <linux/sched.h> | 13 | #include <linux/sched.h> |
14 | #include <linux/smp_lock.h> | ||
14 | #include <linux/kernel.h> | 15 | #include <linux/kernel.h> |
15 | #include <linux/param.h> | 16 | #include <linux/param.h> |
16 | #include <linux/string.h> | 17 | #include <linux/string.h> |
@@ -1659,10 +1660,14 @@ static int mini_rtc_ioctl(struct inode *inode, struct file *file, | |||
1659 | 1660 | ||
1660 | static int mini_rtc_open(struct inode *inode, struct file *file) | 1661 | static int mini_rtc_open(struct inode *inode, struct file *file) |
1661 | { | 1662 | { |
1662 | if (mini_rtc_status & RTC_IS_OPEN) | 1663 | lock_kernel(); |
1664 | if (mini_rtc_status & RTC_IS_OPEN) { | ||
1665 | unlock_kernel(); | ||
1663 | return -EBUSY; | 1666 | return -EBUSY; |
1667 | } | ||
1664 | 1668 | ||
1665 | mini_rtc_status |= RTC_IS_OPEN; | 1669 | mini_rtc_status |= RTC_IS_OPEN; |
1670 | unlock_kernel(); | ||
1666 | 1671 | ||
1667 | return 0; | 1672 | return 0; |
1668 | } | 1673 | } |