aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/rtc/rtc-dev.c
diff options
context:
space:
mode:
authorIngo Molnar <mingo@kernel.org>2015-03-05 14:52:18 -0500
committerIngo Molnar <mingo@kernel.org>2015-03-05 14:52:18 -0500
commit33ca8a53f262b4af40611bea331b8c87d133af72 (patch)
treed6468c820a556c4915bcb5b761204a0fb19e8225 /drivers/rtc/rtc-dev.c
parentdb2dcb4f91d5fec5c346a82c309187ee821e2495 (diff)
parent13a7a6ac0a11197edcd0f756a035f472b42cdf8b (diff)
Merge tag 'v4.0-rc2' into irq/core, to refresh the tree before applying new changes
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Diffstat (limited to 'drivers/rtc/rtc-dev.c')
-rw-r--r--drivers/rtc/rtc-dev.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/rtc/rtc-dev.c b/drivers/rtc/rtc-dev.c
index d04939369251..799c34bcb26f 100644
--- a/drivers/rtc/rtc-dev.c
+++ b/drivers/rtc/rtc-dev.c
@@ -304,12 +304,12 @@ static long rtc_dev_ioctl(struct file *file,
304 * Not supported here. 304 * Not supported here.
305 */ 305 */
306 { 306 {
307 unsigned long now, then; 307 time64_t now, then;
308 308
309 err = rtc_read_time(rtc, &tm); 309 err = rtc_read_time(rtc, &tm);
310 if (err < 0) 310 if (err < 0)
311 return err; 311 return err;
312 rtc_tm_to_time(&tm, &now); 312 now = rtc_tm_to_time64(&tm);
313 313
314 alarm.time.tm_mday = tm.tm_mday; 314 alarm.time.tm_mday = tm.tm_mday;
315 alarm.time.tm_mon = tm.tm_mon; 315 alarm.time.tm_mon = tm.tm_mon;
@@ -317,11 +317,11 @@ static long rtc_dev_ioctl(struct file *file,
317 err = rtc_valid_tm(&alarm.time); 317 err = rtc_valid_tm(&alarm.time);
318 if (err < 0) 318 if (err < 0)
319 return err; 319 return err;
320 rtc_tm_to_time(&alarm.time, &then); 320 then = rtc_tm_to_time64(&alarm.time);
321 321
322 /* alarm may need to wrap into tomorrow */ 322 /* alarm may need to wrap into tomorrow */
323 if (then < now) { 323 if (then < now) {
324 rtc_time_to_tm(now + 24 * 60 * 60, &tm); 324 rtc_time64_to_tm(now + 24 * 60 * 60, &tm);
325 alarm.time.tm_mday = tm.tm_mday; 325 alarm.time.tm_mday = tm.tm_mday;
326 alarm.time.tm_mon = tm.tm_mon; 326 alarm.time.tm_mon = tm.tm_mon;
327 alarm.time.tm_year = tm.tm_year; 327 alarm.time.tm_year = tm.tm_year;