diff options
author | Atsushi Nemoto <anemo@mba.ocn.ne.jp> | 2005-11-03 01:01:15 +0900 |
---|---|---|
committer | Ralf Baechle <ralf@linux-mips.org> | 2005-11-07 18:05:38 +0000 |
commit | 53c2df2f4ebbc1d8231ca7cc13ac5381230888b1 (patch) | |
tree | a7446ec56dd877d77ef7318b4bcdc3d38555ff0a /include/asm-mips/time.h | |
parent | e329331aedeca0f2a7e15bd26a829ee1619c05e0 (diff) |
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.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/include/asm-mips/time.h b/include/asm-mips/time.h index e22a20665871..9cc3564cc2c9 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. |