X-Git-Url: http://pilppa.org/gitweb/?a=blobdiff_plain;f=drivers%2Frtc%2Frtc-s3c.c;h=e2041b4d0c8569ba93791a166520145e8cdaa9cd;hb=d55653377df36f8c04a966f3420335f1a0eb4d83;hp=9a79a24a74874189deab5885af6ea98c6de50746;hpb=a22a0fab32e1216df56e4b9a577dc5c922cf7524;p=linux-2.6-omap-h63xx.git diff --git a/drivers/rtc/rtc-s3c.c b/drivers/rtc/rtc-s3c.c index 9a79a24a748..e2041b4d0c8 100644 --- a/drivers/rtc/rtc-s3c.c +++ b/drivers/rtc/rtc-s3c.c @@ -29,7 +29,7 @@ #include -#include +#include /* I have yet to find an S3C implementation with more than one * of these rtc blocks in */ @@ -50,7 +50,7 @@ static irqreturn_t s3c_rtc_alarmirq(int irq, void *id) { struct rtc_device *rdev = id; - rtc_update_irq(&rdev->class_dev, 1, RTC_AF | RTC_IRQF); + rtc_update_irq(rdev, 1, RTC_AF | RTC_IRQF); return IRQ_HANDLED; } @@ -58,7 +58,7 @@ static irqreturn_t s3c_rtc_tickirq(int irq, void *id) { struct rtc_device *rdev = id; - rtc_update_irq(&rdev->class_dev, tick_count++, RTC_PF | RTC_IRQF); + rtc_update_irq(rdev, tick_count++, RTC_PF | RTC_IRQF); return IRQ_HANDLED; } @@ -542,43 +542,19 @@ static int s3c_rtc_probe(struct platform_device *pdev) /* RTC Power management control */ -static struct timespec s3c_rtc_delta; - static int ticnt_save; static int s3c_rtc_suspend(struct platform_device *pdev, pm_message_t state) { - struct rtc_time tm; - struct timespec time; - - time.tv_nsec = 0; - /* save TICNT for anyone using periodic interrupts */ - ticnt_save = readb(s3c_rtc_base + S3C2410_TICNT); - - /* calculate time delta for suspend */ - - s3c_rtc_gettime(&pdev->dev, &tm); - rtc_tm_to_time(&tm, &time.tv_sec); - save_time_delta(&s3c_rtc_delta, &time); s3c_rtc_enable(pdev, 0); - return 0; } static int s3c_rtc_resume(struct platform_device *pdev) { - struct rtc_time tm; - struct timespec time; - - time.tv_nsec = 0; - s3c_rtc_enable(pdev, 1); - s3c_rtc_gettime(&pdev->dev, &tm); - rtc_tm_to_time(&tm, &time.tv_sec); - restore_time_delta(&s3c_rtc_delta, &time); - writeb(ticnt_save, s3c_rtc_base + S3C2410_TICNT); return 0; }