aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/char/s3c2410-rtc.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/char/s3c2410-rtc.c')
-rw-r--r--drivers/char/s3c2410-rtc.c20
1 files changed, 9 insertions, 11 deletions
diff --git a/drivers/char/s3c2410-rtc.c b/drivers/char/s3c2410-rtc.c
index e1a90d9a8756..887b8b2d7882 100644
--- a/drivers/char/s3c2410-rtc.c
+++ b/drivers/char/s3c2410-rtc.c
@@ -519,30 +519,28 @@ static struct timespec s3c2410_rtc_delta;
519 519
520static int ticnt_save; 520static int ticnt_save;
521 521
522static int s3c2410_rtc_suspend(struct device *dev, pm_message_t state, u32 level) 522static int s3c2410_rtc_suspend(struct device *dev, pm_message_t state)
523{ 523{
524 struct rtc_time tm; 524 struct rtc_time tm;
525 struct timespec time; 525 struct timespec time;
526 526
527 time.tv_nsec = 0; 527 time.tv_nsec = 0;
528 528
529 if (level == SUSPEND_POWER_DOWN) { 529 /* save TICNT for anyone using periodic interrupts */
530 /* save TICNT for anyone using periodic interrupts */
531 530
532 ticnt_save = readb(S3C2410_TICNT); 531 ticnt_save = readb(S3C2410_TICNT);
533 532
534 /* calculate time delta for suspend */ 533 /* calculate time delta for suspend */
535 534
536 s3c2410_rtc_gettime(&tm); 535 s3c2410_rtc_gettime(&tm);
537 rtc_tm_to_time(&tm, &time.tv_sec); 536 rtc_tm_to_time(&tm, &time.tv_sec);
538 save_time_delta(&s3c2410_rtc_delta, &time); 537 save_time_delta(&s3c2410_rtc_delta, &time);
539 s3c2410_rtc_enable(dev, 0); 538 s3c2410_rtc_enable(dev, 0);
540 }
541 539
542 return 0; 540 return 0;
543} 541}
544 542
545static int s3c2410_rtc_resume(struct device *dev, u32 level) 543static int s3c2410_rtc_resume(struct device *dev)
546{ 544{
547 struct rtc_time tm; 545 struct rtc_time tm;
548 struct timespec time; 546 struct timespec time;