From 18242a25ad509475ffcaaeda5dc93dce87d5880e Mon Sep 17 00:00:00 2001 From: luodw1 Date: Thu, 25 Jul 2019 09:56:13 +0800 Subject: [PATCH] debug: add debug logs when keys has action Change-Id: Ic880e8ab4199ca93019f38d3bbee2764f95a6c0b Signed-off-by: luodw1 Reviewed-on: https://gerrit.mot.com/1391470 SLTApproved: Slta Waiver SME-Granted: SME Approvals Granted Tested-by: Jira Key Reviewed-by: Xiangpo Zhao Submit-Approved: Jira Key --- include/linux/debug-snapshot.h | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/include/linux/debug-snapshot.h b/include/linux/debug-snapshot.h index e9d4718800e3..4d64cc382605 100644 --- a/include/linux/debug-snapshot.h +++ b/include/linux/debug-snapshot.h @@ -157,7 +157,10 @@ void dbg_snapshot_dm(int type, unsigned long min, unsigned long max, s32 wait_t, #ifdef CONFIG_DEBUG_SNAPSHOT_CRASH_KEY void dbg_snapshot_check_crash_key(unsigned int code, int value); #else -#define dbg_snapshot_check_crash_key(a,b) do { } while(0) +static inline void dbg_snapshot_check_crash_key(unsigned int code, int value) +{ + pr_info("KEY %d %s\n", code, value ? "pressed" : "released"); +} #endif #ifdef CONFIG_DEBUG_SNAPSHOT_BINDER -- 2.20.1