PM: move initcall_debug message in syscore_resume
Daehyoung Ko [Wed, 13 Jun 2012 00:31:35 +0000 (17:31 -0700)]
debug uart driver needs to be resumed before calling printk
so move debug message after finishing resume

bug 992588

Change-Id: Ia8991a4b7be7a4e2a765c8e6b494fd906b38b98c
Signed-off-by: Daehyoung Ko <dko@nvidia.com>
Reviewed-on: http://git-master/r/108435
(cherry picked from commit 75e7ef273d52b40d5d662541043e7eebc74ee24e)
Reviewed-on: http://git-master/r/110433
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Laxman Dewangan <ldewangan@nvidia.com>

drivers/base/syscore.c

index e8d11b6..0240f01 100644 (file)
@@ -97,12 +97,16 @@ void syscore_resume(void)
 
        list_for_each_entry(ops, &syscore_ops_list, node)
                if (ops->resume) {
-                       if (initcall_debug)
-                               pr_info("PM: Calling %pF\n", ops->resume);
                        ops->resume();
                        WARN_ONCE(!irqs_disabled(),
                                "Interrupts enabled after %pF\n", ops->resume);
                }
+       if (initcall_debug) {
+               list_for_each_entry(ops, &syscore_ops_list, node)
+                       if (ops->resume) {
+                               pr_info("PM: Called %pF\n", ops->resume);
+                       }
+       }
 }
 EXPORT_SYMBOL_GPL(syscore_resume);
 #endif /* CONFIG_PM_SLEEP */