patch-2.4.19 linux-2.4.19/arch/m68k/sun3x/time.c
Next file: linux-2.4.19/arch/m68k/sun3x/time.h
Previous file: linux-2.4.19/arch/m68k/sun3x/prom.c
Back to the patch index
Back to the overall index
- Lines: 55
- Date:
Fri Aug 2 17:39:43 2002
- Orig file:
linux-2.4.18/arch/m68k/sun3x/time.c
- Orig date:
Mon Jun 11 19:15:27 2001
diff -urN linux-2.4.18/arch/m68k/sun3x/time.c linux-2.4.19/arch/m68k/sun3x/time.c
@@ -10,6 +10,7 @@
#include <linux/sched.h>
#include <linux/kernel_stat.h>
#include <linux/interrupt.h>
+#include <linux/rtc.h>
#include <asm/irq.h>
#include <asm/io.h>
@@ -59,7 +60,7 @@
*(eeprom + M_CONTROL) &= ~C_READ;
}
-int sun3x_hwclk(int set, struct hwclk_time *t)
+int sun3x_hwclk(int set, struct rtc_time *t)
{
volatile struct mostek_dt *h =
(unsigned char *)(SUN3X_EEPROM+M_CONTROL);
@@ -69,23 +70,23 @@
if(set) {
h->csr |= C_WRITE;
- h->sec = BIN_TO_BCD(t->sec);
- h->min = BIN_TO_BCD(t->min);
- h->hour = BIN_TO_BCD(t->hour);
- h->wday = BIN_TO_BCD(t->wday);
- h->mday = BIN_TO_BCD(t->day);
- h->month = BIN_TO_BCD(t->mon);
- h->year = BIN_TO_BCD(t->year);
+ h->sec = BIN_TO_BCD(t->tm_sec);
+ h->min = BIN_TO_BCD(t->tm_min);
+ h->hour = BIN_TO_BCD(t->tm_hour);
+ h->wday = BIN_TO_BCD(t->tm_wday);
+ h->mday = BIN_TO_BCD(t->tm_mday);
+ h->month = BIN_TO_BCD(t->tm_mon);
+ h->year = BIN_TO_BCD(t->tm_year);
h->csr &= ~C_WRITE;
} else {
h->csr |= C_READ;
- t->sec = BCD_TO_BIN(h->sec);
- t->min = BCD_TO_BIN(h->min);
- t->hour = BCD_TO_BIN(h->hour);
- t->wday = BCD_TO_BIN(h->wday);
- t->day = BCD_TO_BIN(h->mday);
- t->mon = BCD_TO_BIN(h->month);
- t->year = BCD_TO_BIN(h->year);
+ t->tm_sec = BCD_TO_BIN(h->sec);
+ t->tm_min = BCD_TO_BIN(h->min);
+ t->tm_hour = BCD_TO_BIN(h->hour);
+ t->tm_wday = BCD_TO_BIN(h->wday);
+ t->tm_mday = BCD_TO_BIN(h->mday);
+ t->tm_mon = BCD_TO_BIN(h->month);
+ t->tm_year = BCD_TO_BIN(h->year);
h->csr &= ~C_READ;
}
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)