linux 2.6.16.38 w/ vs2.0.3-rc1
[linux-2.6.git] / arch / i386 / kernel / timers / timer_pm.c
index 737a021..264edaa 100644 (file)
@@ -186,6 +186,14 @@ static void mark_offset_pmtmr(void)
        }
 }
 
+static int pmtmr_resume(void)
+{
+       write_seqlock(&monotonic_lock);
+       /* Assume this is the last mark offset time */
+       offset_tick = read_pmtmr();
+       write_sequnlock(&monotonic_lock);
+       return 0;
+}
 
 static unsigned long long monotonic_clock_pmtmr(void)
 {
@@ -240,15 +248,20 @@ static unsigned long get_offset_pmtmr(void)
 
 
 /* acpi timer_opts struct */
-struct timer_opts timer_pmtmr = {
+static struct timer_opts timer_pmtmr = {
        .name                   = "pmtmr",
-       .init                   = init_pmtmr,
        .mark_offset            = mark_offset_pmtmr,
        .get_offset             = get_offset_pmtmr,
        .monotonic_clock        = monotonic_clock_pmtmr,
        .delay                  = delay_pmtmr,
+       .read_timer             = read_timer_tsc,
+       .resume                 = pmtmr_resume,
 };
 
+struct init_timer_opts __initdata timer_pmtmr_init = {
+       .init = init_pmtmr,
+       .opts = &timer_pmtmr,
+};
 
 MODULE_LICENSE("GPL");
 MODULE_AUTHOR("Dominik Brodowski <linux@brodo.de>");