aboutsummaryrefslogtreecommitdiffstats
path: root/arch/m68k/bvme6000/rtc.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/m68k/bvme6000/rtc.c')
-rw-r--r--arch/m68k/bvme6000/rtc.c30
1 files changed, 15 insertions, 15 deletions
diff --git a/arch/m68k/bvme6000/rtc.c b/arch/m68k/bvme6000/rtc.c
index e8ac3f7d72df..808c9018b115 100644
--- a/arch/m68k/bvme6000/rtc.c
+++ b/arch/m68k/bvme6000/rtc.c
@@ -57,16 +57,16 @@ static int rtc_ioctl(struct inode *inode, struct file *file, unsigned int cmd,
57 rtc->msr = 0x40; 57 rtc->msr = 0x40;
58 memset(&wtime, 0, sizeof(struct rtc_time)); 58 memset(&wtime, 0, sizeof(struct rtc_time));
59 do { 59 do {
60 wtime.tm_sec = BCD2BIN(rtc->bcd_sec); 60 wtime.tm_sec = bcd2bin(rtc->bcd_sec);
61 wtime.tm_min = BCD2BIN(rtc->bcd_min); 61 wtime.tm_min = bcd2bin(rtc->bcd_min);
62 wtime.tm_hour = BCD2BIN(rtc->bcd_hr); 62 wtime.tm_hour = bcd2bin(rtc->bcd_hr);
63 wtime.tm_mday = BCD2BIN(rtc->bcd_dom); 63 wtime.tm_mday = bcd2bin(rtc->bcd_dom);
64 wtime.tm_mon = BCD2BIN(rtc->bcd_mth)-1; 64 wtime.tm_mon = bcd2bin(rtc->bcd_mth)-1;
65 wtime.tm_year = BCD2BIN(rtc->bcd_year); 65 wtime.tm_year = bcd2bin(rtc->bcd_year);
66 if (wtime.tm_year < 70) 66 if (wtime.tm_year < 70)
67 wtime.tm_year += 100; 67 wtime.tm_year += 100;
68 wtime.tm_wday = BCD2BIN(rtc->bcd_dow)-1; 68 wtime.tm_wday = bcd2bin(rtc->bcd_dow)-1;
69 } while (wtime.tm_sec != BCD2BIN(rtc->bcd_sec)); 69 } while (wtime.tm_sec != bcd2bin(rtc->bcd_sec));
70 rtc->msr = msr; 70 rtc->msr = msr;
71 local_irq_restore(flags); 71 local_irq_restore(flags);
72 return copy_to_user(argp, &wtime, sizeof wtime) ? 72 return copy_to_user(argp, &wtime, sizeof wtime) ?
@@ -114,14 +114,14 @@ static int rtc_ioctl(struct inode *inode, struct file *file, unsigned int cmd,
114 114
115 rtc->t0cr_rtmr = yrs%4; 115 rtc->t0cr_rtmr = yrs%4;
116 rtc->bcd_tenms = 0; 116 rtc->bcd_tenms = 0;
117 rtc->bcd_sec = BIN2BCD(sec); 117 rtc->bcd_sec = bin2bcd(sec);
118 rtc->bcd_min = BIN2BCD(min); 118 rtc->bcd_min = bin2bcd(min);
119 rtc->bcd_hr = BIN2BCD(hrs); 119 rtc->bcd_hr = bin2bcd(hrs);
120 rtc->bcd_dom = BIN2BCD(day); 120 rtc->bcd_dom = bin2bcd(day);
121 rtc->bcd_mth = BIN2BCD(mon); 121 rtc->bcd_mth = bin2bcd(mon);
122 rtc->bcd_year = BIN2BCD(yrs%100); 122 rtc->bcd_year = bin2bcd(yrs%100);
123 if (rtc_tm.tm_wday >= 0) 123 if (rtc_tm.tm_wday >= 0)
124 rtc->bcd_dow = BIN2BCD(rtc_tm.tm_wday+1); 124 rtc->bcd_dow = bin2bcd(rtc_tm.tm_wday+1);
125 rtc->t0cr_rtmr = yrs%4 | 0x08; 125 rtc->t0cr_rtmr = yrs%4 | 0x08;
126 126
127 rtc->msr = msr; 127 rtc->msr = msr;