File tree Expand file tree Collapse file tree 1 file changed +8
-5
lines changed Expand file tree Collapse file tree 1 file changed +8
-5
lines changed Original file line number Diff line number Diff line change @@ -310,11 +310,6 @@ static int s3c_rtc_setalarm(struct device *dev, struct rtc_wkalrm *alrm)
310
310
311
311
s3c_rtc_setaie (alrm -> enabled );
312
312
313
- if (alrm -> enabled )
314
- enable_irq_wake (s3c_rtc_alarmno );
315
- else
316
- disable_irq_wake (s3c_rtc_alarmno );
317
-
318
313
return 0 ;
319
314
}
320
315
@@ -587,6 +582,10 @@ static int s3c_rtc_suspend(struct platform_device *pdev, pm_message_t state)
587
582
ticnt_en_save &= S3C64XX_RTCCON_TICEN ;
588
583
}
589
584
s3c_rtc_enable (pdev , 0 );
585
+
586
+ if (device_may_wakeup (& pdev -> dev ))
587
+ enable_irq_wake (s3c_rtc_alarmno );
588
+
590
589
return 0 ;
591
590
}
592
591
@@ -600,6 +599,10 @@ static int s3c_rtc_resume(struct platform_device *pdev)
600
599
tmp = readb (s3c_rtc_base + S3C2410_RTCCON );
601
600
writeb (tmp | ticnt_en_save , s3c_rtc_base + S3C2410_RTCCON );
602
601
}
602
+
603
+ if (device_may_wakeup (& pdev -> dev ))
604
+ disable_irq_wake (s3c_rtc_alarmno );
605
+
603
606
return 0 ;
604
607
}
605
608
#else
You can’t perform that action at this time.
0 commit comments