summaryrefslogtreecommitdiffstats
path: root/include/asm-mips/time.h
diff options
context:
space:
mode:
authorAtsushi Nemoto <anemo@mba.ocn.ne.jp>2005-11-03 01:01:15 +0900
committerRalf Baechle <ralf@linux-mips.org>2005-11-07 18:05:38 +0000
commit53c2df2f4ebbc1d8231ca7cc13ac5381230888b1 (patch)
treea7446ec56dd877d77ef7318b4bcdc3d38555ff0a /include/asm-mips/time.h
parente329331aedeca0f2a7e15bd26a829ee1619c05e0 (diff)
downloadop-kernel-dev-53c2df2f4ebbc1d8231ca7cc13ac5381230888b1.zip
op-kernel-dev-53c2df2f4ebbc1d8231ca7cc13ac5381230888b1.tar.gz
Use rtc_lock to protect RTC operations
Many RTC routines were not protected against each other, so there are potential races, for example, ntp-update against /dev/rtc. This patch fixes them using rtc_lock. 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/time.h')
-rw-r--r--include/asm-mips/time.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/include/asm-mips/time.h b/include/asm-mips/time.h
index e22a206..9cc3564c 100644
--- a/include/asm-mips/time.h
+++ b/include/asm-mips/time.h
@@ -20,6 +20,9 @@
#include <linux/linkage.h>
#include <linux/ptrace.h>
#include <linux/rtc.h>
+#include <linux/spinlock.h>
+
+extern spinlock_t rtc_lock;
/*
* RTC ops. By default, they point to no-RTC functions.
OpenPOWER on IntegriCloud