summaryrefslogtreecommitdiffstats
path: root/arch/mips/lasat/sysctl.c
diff options
context:
space:
mode:
authorRalf Baechle <ralf@linux-mips.org>2007-10-11 23:46:08 +0100
committerRalf Baechle <ralf@linux-mips.org>2007-10-11 23:46:08 +0100
commit4b550488f894c899aa54dc935c8fee47bca2b7df (patch)
treef7ee1d0ff80542124b5fa864a30022277d703c49 /arch/mips/lasat/sysctl.c
parentf5ff0a280201c9cbfb6e9eb4bafdb465c2269ed3 (diff)
[MIPS] Deforest the function pointer jungle in the time code.
Hard to follow who is pointing what to where and why so it's simply getting in the way of the time code renovation. Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
Diffstat (limited to 'arch/mips/lasat/sysctl.c')
-rw-r--r--arch/mips/lasat/sysctl.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/arch/mips/lasat/sysctl.c b/arch/mips/lasat/sysctl.c
index 4575a829766..389336c4ecc 100644
--- a/arch/mips/lasat/sysctl.c
+++ b/arch/mips/lasat/sysctl.c
@@ -32,6 +32,8 @@
#include <linux/mutex.h>
#include <linux/uaccess.h>
+#include <asm/time.h>
+
#include "sysctl.h"
#include "ds1603.h"
@@ -106,7 +108,7 @@ int proc_dolasatrtc(ctl_table *table, int write, struct file *filp,
mutex_lock(&lasat_info_mutex);
if (!write) {
- rtctmp = ds1603_read();
+ rtctmp = read_persistent_clock();
/* check for time < 0 and set to 0 */
if (rtctmp < 0)
rtctmp = 0;
@@ -116,7 +118,7 @@ int proc_dolasatrtc(ctl_table *table, int write, struct file *filp,
mutex_unlock(&lasat_info_mutex);
return r;
}
- ds1603_set(rtctmp);
+ rtc_mips_set_mmss(rtctmp);
mutex_unlock(&lasat_info_mutex);
return 0;
@@ -152,7 +154,7 @@ int sysctl_lasat_rtc(ctl_table *table, int *name, int nlen,
int r;
mutex_lock(&lasat_info_mutex);
- rtctmp = ds1603_read();
+ rtctmp = read_persistent_clock();
if (rtctmp < 0)
rtctmp = 0;
r = sysctl_intvec(table, name, nlen, oldval, oldlenp, newval, newlen);
@@ -161,7 +163,7 @@ int sysctl_lasat_rtc(ctl_table *table, int *name, int nlen,
return r;
}
if (newval && newlen)
- ds1603_set(rtctmp);
+ rtc_mips_set_mmss(rtctmp);
mutex_unlock(&lasat_info_mutex);
return 1;