summaryrefslogtreecommitdiffstats
path: root/include/asm-mips
diff options
context:
space:
mode:
authorAtsushi Nemoto <anemo@mba.ocn.ne.jp>2005-11-03 01:02:40 +0900
committerRalf Baechle <ralf@linux-mips.org>2005-11-07 18:05:38 +0000
commite329331aedeca0f2a7e15bd26a829ee1619c05e0 (patch)
treebce2bb4ecb6b6808e9e4ebb802808e851693fa40 /include/asm-mips
parent28622795972984359b74aa36f9645c7ca23e460b (diff)
downloadkernel-crypto-e329331aedeca0f2a7e15bd26a829ee1619c05e0.tar.gz
kernel-crypto-e329331aedeca0f2a7e15bd26a829ee1619c05e0.tar.xz
kernel-crypto-e329331aedeca0f2a7e15bd26a829ee1619c05e0.zip
Remove mips_rtc_lock
The mips_rtc_lock is no longer needed because RTC operations should be protected already by other mechanism. (rtc_lock, local_irq_save, etc.) Also, locking whole rtc_get_time/rtc_set_time should be avoided while some RTC routines might take very long time (a few seconds). Signed-off-by: Atsushi Nemoto <anemo@mba.ocn.ne.jp> Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
Diffstat (limited to 'include/asm-mips')
-rw-r--r--include/asm-mips/rtc.h7
1 files changed, 0 insertions, 7 deletions
diff --git a/include/asm-mips/rtc.h b/include/asm-mips/rtc.h
index a60e0dc7c9b..a2abc4572b6 100644
--- a/include/asm-mips/rtc.h
+++ b/include/asm-mips/rtc.h
@@ -14,7 +14,6 @@
#ifdef __KERNEL__
-#include <linux/spinlock.h>
#include <linux/rtc.h>
#include <asm/time.h>
@@ -29,17 +28,13 @@
#define RTC_24H 0x02 /* 24 hour mode - else hours bit 7 means pm */
#define RTC_DST_EN 0x01 /* auto switch DST - works f. USA only */
-static DEFINE_SPINLOCK(mips_rtc_lock);
-
static inline unsigned int get_rtc_time(struct rtc_time *time)
{
unsigned long nowtime;
- spin_lock(&mips_rtc_lock);
nowtime = rtc_get_time();
to_tm(nowtime, time);
time->tm_year -= 1900;
- spin_unlock(&mips_rtc_lock);
return RTC_24H;
}
@@ -49,12 +44,10 @@ static inline int set_rtc_time(struct rtc_time *time)
unsigned long nowtime;
int ret;
- spin_lock(&mips_rtc_lock);
nowtime = mktime(time->tm_year+1900, time->tm_mon+1,
time->tm_mday, time->tm_hour, time->tm_min,
time->tm_sec);
ret = rtc_set_time(nowtime);
- spin_unlock(&mips_rtc_lock);
return ret;
}