diff options
author | Arnd Bergmann <arnd@arndb.de> | 2008-05-20 13:16:37 -0400 |
---|---|---|
committer | Jonathan Corbet <corbet@lwn.net> | 2008-07-02 17:06:24 -0400 |
commit | 4333deee6b7a5a82afb9e700e76cb46e68fde68d (patch) | |
tree | 0dee106feae97fe882044b6ea832336726d45c04 /drivers | |
parent | f29b889edef0c3ab98732c84247c790a1583cb94 (diff) |
rtc: BKL pushdown
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/char/rtc.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/char/rtc.c b/drivers/char/rtc.c index 5f80a9dff573..10f06a6bfeb5 100644 --- a/drivers/char/rtc.c +++ b/drivers/char/rtc.c | |||
@@ -73,6 +73,7 @@ | |||
73 | #include <linux/proc_fs.h> | 73 | #include <linux/proc_fs.h> |
74 | #include <linux/seq_file.h> | 74 | #include <linux/seq_file.h> |
75 | #include <linux/spinlock.h> | 75 | #include <linux/spinlock.h> |
76 | #include <linux/smp_lock.h> | ||
76 | #include <linux/sysctl.h> | 77 | #include <linux/sysctl.h> |
77 | #include <linux/wait.h> | 78 | #include <linux/wait.h> |
78 | #include <linux/bcd.h> | 79 | #include <linux/bcd.h> |
@@ -733,6 +734,7 @@ static int rtc_ioctl(struct inode *inode, struct file *file, unsigned int cmd, | |||
733 | * needed here. Or anywhere else in this driver. */ | 734 | * needed here. Or anywhere else in this driver. */ |
734 | static int rtc_open(struct inode *inode, struct file *file) | 735 | static int rtc_open(struct inode *inode, struct file *file) |
735 | { | 736 | { |
737 | lock_kernel(); | ||
736 | spin_lock_irq(&rtc_lock); | 738 | spin_lock_irq(&rtc_lock); |
737 | 739 | ||
738 | if (rtc_status & RTC_IS_OPEN) | 740 | if (rtc_status & RTC_IS_OPEN) |
@@ -742,10 +744,12 @@ static int rtc_open(struct inode *inode, struct file *file) | |||
742 | 744 | ||
743 | rtc_irq_data = 0; | 745 | rtc_irq_data = 0; |
744 | spin_unlock_irq(&rtc_lock); | 746 | spin_unlock_irq(&rtc_lock); |
747 | unlock_kernel(); | ||
745 | return 0; | 748 | return 0; |
746 | 749 | ||
747 | out_busy: | 750 | out_busy: |
748 | spin_unlock_irq(&rtc_lock); | 751 | spin_unlock_irq(&rtc_lock); |
752 | unlock_kernel(); | ||
749 | return -EBUSY; | 753 | return -EBUSY; |
750 | } | 754 | } |
751 | 755 | ||