summaryrefslogtreecommitdiff
path: root/drivers/rtc/interface.c
diff options
context:
space:
mode:
authorThomas Gleixner <tglx@linutronix.de>2016-12-25 13:38:40 +0300
committerThomas Gleixner <tglx@linutronix.de>2016-12-25 19:21:22 +0300
commit2456e855354415bfaeb7badaa14e11b3e02c8466 (patch)
tree6fc81500645174c246c3fdb568cba32aa01960c6 /drivers/rtc/interface.c
parenta5a1d1c2914b5316924c7893eb683a5420ebd3be (diff)
downloadlinux-2456e855354415bfaeb7badaa14e11b3e02c8466.tar.xz
ktime: Get rid of the union
ktime is a union because the initial implementation stored the time in scalar nanoseconds on 64 bit machine and in a endianess optimized timespec variant for 32bit machines. The Y2038 cleanup removed the timespec variant and switched everything to scalar nanoseconds. The union remained, but become completely pointless. Get rid of the union and just keep ktime_t as simple typedef of type s64. The conversion was done with coccinelle and some manual mopping up. Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Cc: Peter Zijlstra <peterz@infradead.org>
Diffstat (limited to 'drivers/rtc/interface.c')
-rw-r--r--drivers/rtc/interface.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/rtc/interface.c b/drivers/rtc/interface.c
index 84a52db9b05f..5cf196dfc193 100644
--- a/drivers/rtc/interface.c
+++ b/drivers/rtc/interface.c
@@ -394,8 +394,8 @@ int rtc_initialize_alarm(struct rtc_device *rtc, struct rtc_wkalrm *alarm)
rtc->aie_timer.period = ktime_set(0, 0);
/* Alarm has to be enabled & in the future for us to enqueue it */
- if (alarm->enabled && (rtc_tm_to_ktime(now).tv64 <
- rtc->aie_timer.node.expires.tv64)) {
+ if (alarm->enabled && (rtc_tm_to_ktime(now) <
+ rtc->aie_timer.node.expires)) {
rtc->aie_timer.enabled = 1;
timerqueue_add(&rtc->timerqueue, &rtc->aie_timer.node);
@@ -766,7 +766,7 @@ static int rtc_timer_enqueue(struct rtc_device *rtc, struct rtc_timer *timer)
/* Skip over expired timers */
while (next) {
- if (next->expires.tv64 >= now.tv64)
+ if (next->expires >= now)
break;
next = timerqueue_iterate_next(next);
}
@@ -858,7 +858,7 @@ again:
__rtc_read_time(rtc, &tm);
now = rtc_tm_to_ktime(tm);
while ((next = timerqueue_getnext(&rtc->timerqueue))) {
- if (next->expires.tv64 > now.tv64)
+ if (next->expires > now)
break;
/* expire timer */