Merge branch 'sched/for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip...
[pandora-kernel.git] / drivers / base / power / trace.c
index a9ab30f..87a7f1d 100644 (file)
@@ -114,7 +114,7 @@ static unsigned int read_magic_time(void)
        get_rtc_time(&time);
        printk("Time: %2d:%02d:%02d  Date: %02d/%02d/%02d\n",
                time.tm_hour, time.tm_min, time.tm_sec,
-               time.tm_mon, time.tm_mday, time.tm_year);
+               time.tm_mon + 1, time.tm_mday, time.tm_year % 100);
        val = time.tm_year;                             /* 100 years */
        if (val > 100)
                val -= 100;
@@ -142,6 +142,7 @@ void set_trace_device(struct device *dev)
 {
        dev_hash_value = hash_string(DEVSEED, dev->bus_id, DEVHASH);
 }
+EXPORT_SYMBOL(set_trace_device);
 
 /*
  * We could just take the "tracedata" index into the .tracedata
@@ -152,7 +153,7 @@ void set_trace_device(struct device *dev)
  * it's not any guarantee, but it's a high _likelihood_ that
  * the match is valid).
  */
-void generate_resume_trace(void *tracedata, unsigned int user)
+void generate_resume_trace(const void *tracedata, unsigned int user)
 {
        unsigned short lineno = *(unsigned short *)tracedata;
        const char *file = *(const char **)(tracedata + 2);
@@ -162,6 +163,7 @@ void generate_resume_trace(void *tracedata, unsigned int user)
        file_hash_value = hash_string(lineno, file, FILEHASH);
        set_magic_time(user_hash_value, file_hash_value, dev_hash_value);
 }
+EXPORT_SYMBOL(generate_resume_trace);
 
 extern char __tracedata_start, __tracedata_end;
 static int show_file_hash(unsigned int value)
@@ -170,7 +172,8 @@ static int show_file_hash(unsigned int value)
        char *tracedata;
 
        match = 0;
-       for (tracedata = &__tracedata_start ; tracedata < &__tracedata_end ; tracedata += 6) {
+       for (tracedata = &__tracedata_start ; tracedata < &__tracedata_end ;
+                       tracedata += 2 + sizeof(unsigned long)) {
                unsigned short lineno = *(unsigned short *)tracedata;
                const char *file = *(const char **)(tracedata + 2);
                unsigned int hash = hash_string(lineno, file, FILEHASH);