summaryrefslogtreecommitdiffstats
path: root/drivers/rtc/interface.c
diff options
context:
space:
mode:
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 5cf196dfc193..fc0fa7577636 100644
--- a/drivers/rtc/interface.c
+++ b/drivers/rtc/interface.c
@@ -363,7 +363,7 @@ int rtc_set_alarm(struct rtc_device *rtc, struct rtc_wkalrm *alarm)
363 rtc_timer_remove(rtc, &rtc->aie_timer); 363 rtc_timer_remove(rtc, &rtc->aie_timer);
364 364
365 rtc->aie_timer.node.expires = rtc_tm_to_ktime(alarm->time); 365 rtc->aie_timer.node.expires = rtc_tm_to_ktime(alarm->time);
366 rtc->aie_timer.period = ktime_set(0, 0); 366 rtc->aie_timer.period = 0;
367 if (alarm->enabled) 367 if (alarm->enabled)
368 err = rtc_timer_enqueue(rtc, &rtc->aie_timer); 368 err = rtc_timer_enqueue(rtc, &rtc->aie_timer);
369 369
@@ -391,7 +391,7 @@ int rtc_initialize_alarm(struct rtc_device *rtc, struct rtc_wkalrm *alarm)
391 return err; 391 return err;
392 392
393 rtc->aie_timer.node.expires = rtc_tm_to_ktime(alarm->time); 393 rtc->aie_timer.node.expires = rtc_tm_to_ktime(alarm->time);
394 rtc->aie_timer.period = ktime_set(0, 0); 394 rtc->aie_timer.period = 0;
395 395
396 /* Alarm has to be enabled & in the future for us to enqueue it */ 396 /* Alarm has to be enabled & in the future for us to enqueue it */
397 if (alarm->enabled && (rtc_tm_to_ktime(now) < 397 if (alarm->enabled && (rtc_tm_to_ktime(now) <
@@ -554,7 +554,7 @@ enum hrtimer_restart rtc_pie_update_irq(struct hrtimer *timer)
554 int count; 554 int count;
555 rtc = container_of(timer, struct rtc_device, pie_timer); 555 rtc = container_of(timer, struct rtc_device, pie_timer);
556 556
557 period = ktime_set(0, NSEC_PER_SEC/rtc->irq_freq); 557 period = NSEC_PER_SEC / rtc->irq_freq;
558 count = hrtimer_forward_now(timer, period); 558 count = hrtimer_forward_now(timer, period);
559 559
560 rtc_handle_legacy_irq(rtc, count, RTC_PF); 560 rtc_handle_legacy_irq(rtc, count, RTC_PF);
@@ -665,7 +665,7 @@ static int rtc_update_hrtimer(struct rtc_device *rtc, int enabled)
665 return -1; 665 return -1;
666 666
667 if (enabled) { 667 if (enabled) {
668 ktime_t period = ktime_set(0, NSEC_PER_SEC / rtc->irq_freq); 668 ktime_t period = NSEC_PER_SEC / rtc->irq_freq;
669 669
670 hrtimer_start(&rtc->pie_timer, period, HRTIMER_MODE_REL); 670 hrtimer_start(&rtc->pie_timer, period, HRTIMER_MODE_REL);
671 } 671 }