debug: add debug logs when keys has action
authorluodw1 <luodw1@motorola.com>
Thu, 25 Jul 2019 01:56:13 +0000 (09:56 +0800)
committerlingsen1 <lingsen1@lenovo.com>
Sun, 7 Feb 2021 09:37:03 +0000 (17:37 +0800)
Change-Id: Ic880e8ab4199ca93019f38d3bbee2764f95a6c0b
Signed-off-by: luodw1 <luodw1@motorola.com>
Reviewed-on: https://gerrit.mot.com/1391470
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: Xiangpo Zhao <zhaoxp3@motorola.com>
Submit-Approved: Jira Key

include/linux/debug-snapshot.h

index e9d4718800e35756f14ef38657568fbdfa422dee..4d64cc382605f29d9e8aefcb50195416d68a4bff 100644 (file)
@@ -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