diff options
author | Atsushi Nemoto <anemo@mba.ocn.ne.jp> | 2005-11-02 17:01:15 +0100 |
---|---|---|
committer | Ralf Baechle <ralf@linux-mips.org> | 2005-11-07 19:05:38 +0100 |
commit | 53c2df2f4ebbc1d8231ca7cc13ac5381230888b1 (patch) | |
tree | a7446ec56dd877d77ef7318b4bcdc3d38555ff0a /include/asm-mips/time.h | |
parent | Remove mips_rtc_lock (diff) | |
download | linux-53c2df2f4ebbc1d8231ca7cc13ac5381230888b1.tar.xz linux-53c2df2f4ebbc1d8231ca7cc13ac5381230888b1.zip |
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 '')
-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. |