[MIPS] Switch from to_tm to rtc_time_to_tm
[pandora-kernel.git] / arch / mips / pmc-sierra / yosemite / setup.c
index 56bf695..015fcc3 100644 (file)
@@ -100,8 +100,12 @@ int rtc_mips_set_time(unsigned long tim)
        struct rtc_time tm;
        unsigned long flags;
 
-       /* convert to a more useful format -- note months count from 0 */
-       to_tm(sec, &tm);
+       /*
+        * Convert to a more useful format -- note months count from 0
+        * and years from 1900
+        */
+       rtc_time_to_tm(tim, &tm);
+       tm.tm_year += 1900;
        tm.tm_mon += 1;
 
        spin_lock_irqsave(&rtc_lock, flags);