Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=0c358e70762861f8d479f3fa8bec358c599ba04a
Commit:     0c358e70762861f8d479f3fa8bec358c599ba04a
Parent:     ee46a90b599952bb1a9dc67f894710017e7cc409
Author:     Johannes Berg <[EMAIL PROTECTED]>
AuthorDate: Thu May 3 00:25:42 2007 +1000
Committer:  Paul Mackerras <[EMAIL PROTECTED]>
CommitDate: Mon Jun 25 16:56:09 2007 +1000

    [POWERPC] Use mktime in timer sysdev
    
    This makes the timer sysdev use mktime instead of rtc_tm_to_time,
    since rtc_tm_to_time just calls mktime anyway, and this means we
    don't have a dependency on rtc-lib.
    
    Signed-off-by: Johannes Berg <[EMAIL PROTECTED]>
    Signed-off-by: Paul Mackerras <[EMAIL PROTECTED]>
---
 arch/powerpc/Kconfig        |    5 -----
 arch/powerpc/sysdev/timer.c |   14 ++++++++++++--
 2 files changed, 12 insertions(+), 7 deletions(-)

diff --git a/arch/powerpc/Kconfig b/arch/powerpc/Kconfig
index 882f8a1..2901220 100644
--- a/arch/powerpc/Kconfig
+++ b/arch/powerpc/Kconfig
@@ -6,11 +6,6 @@ mainmenu "Linux/PowerPC Kernel Configuration"
 
 source "arch/powerpc/platforms/Kconfig.cputype"
 
-config PPC_PM_NEEDS_RTC_LIB
-       bool
-       select RTC_LIB
-       default y if PM
-
 config PPC32
        bool
        default y if !PPC64
diff --git a/arch/powerpc/sysdev/timer.c b/arch/powerpc/sysdev/timer.c
index 4a01748..e81e7ec 100644
--- a/arch/powerpc/sysdev/timer.c
+++ b/arch/powerpc/sysdev/timer.c
@@ -24,7 +24,12 @@ static int timer_resume(struct sys_device *dev)
 
        /* get current RTC time and convert to seconds */
        get_rtc_time(&cur_rtc_tm);
-       rtc_tm_to_time(&cur_rtc_tm, &cur_rtc_time);
+       cur_rtc_time = mktime(cur_rtc_tm.tm_year + 1900,
+                             cur_rtc_tm.tm_mon + 1,
+                             cur_rtc_tm.tm_mday,
+                             cur_rtc_tm.tm_hour,
+                             cur_rtc_tm.tm_min,
+                             cur_rtc_tm.tm_sec);
 
        diff = cur_rtc_time - suspend_rtc_time;
 
@@ -44,7 +49,12 @@ static int timer_suspend(struct sys_device *dev, 
pm_message_t state)
        WARN_ON(!ppc_md.get_rtc_time);
 
        get_rtc_time(&suspend_rtc_tm);
-       rtc_tm_to_time(&suspend_rtc_tm, &suspend_rtc_time);
+       suspend_rtc_time = mktime(suspend_rtc_tm.tm_year + 1900,
+                                 suspend_rtc_tm.tm_mon + 1,
+                                 suspend_rtc_tm.tm_mday,
+                                 suspend_rtc_tm.tm_hour,
+                                 suspend_rtc_tm.tm_min,
+                                 suspend_rtc_tm.tm_sec);
 
        return 0;
 }
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to