Skip to content

Instantly share code, notes, and snippets.

@xc-racer99
Created August 8, 2019 04:17
Show Gist options
  • Save xc-racer99/f40a3d59d6a73545596aa238fc387be4 to your computer and use it in GitHub Desktop.
Save xc-racer99/f40a3d59d6a73545596aa238fc387be4 to your computer and use it in GitHub Desktop.
Fix PM_DEBUG on s5pv210 on v5.3
diff --git a/include/linux/suspend.h b/include/linux/suspend.h
index 9c0ad1a3a727..507dc4af3ba9 100644
--- a/include/linux/suspend.h
+++ b/include/linux/suspend.h
@@ -534,8 +534,13 @@ static inline void unlock_system_sleep(void) {}
#ifdef CONFIG_PM_SLEEP_DEBUG
extern bool pm_print_times_enabled;
extern bool pm_debug_messages_on;
+#if 0
extern __printf(2, 3) void __pm_pr_dbg(bool defer, const char *fmt, ...);
#else
+#define __pm_pr_dbg(defer, fmt, ...) \
+ no_printk(KERN_DEBUG fmt, ##__VA_ARGS__)
+#endif
+#else
#define pm_print_times_enabled (false)
#define pm_debug_messages_on (false)
diff --git a/kernel/power/main.c b/kernel/power/main.c
index bdbd605c4215..a9a39fdbb782 100644
--- a/kernel/power/main.c
+++ b/kernel/power/main.c
@@ -417,6 +417,7 @@ static ssize_t pm_debug_messages_store(struct kobject *kobj,
power_attr(pm_debug_messages);
+#if 0
/**
* __pm_pr_dbg - Print a suspend debug message to the kernel log.
* @defer: Whether or not to use printk_deferred() to print the message.
@@ -445,6 +446,7 @@ void __pm_pr_dbg(bool defer, const char *fmt, ...)
va_end(args);
}
+#endif
#else /* !CONFIG_PM_SLEEP_DEBUG */
static inline void pm_print_times_init(void) {}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment