Explorar o código

touch: goodix: handle suspend/resume in probe fail cases

In case of goodix probe failure, avoid touch suspend/ resume
callbacks from dpms panel event notifier.

Change-Id: Ib3be59e02296a3edd2bb8ec39c5fdbd1cc25ae61
Signed-off-by: Raviteja Tamatam <[email protected]>
Raviteja Tamatam %!s(int64=2) %!d(string=hai) anos
pai
achega
fb8b1097a2
Modificáronse 1 ficheiros con 6 adicións e 0 borrados
  1. 6 0
      goodix_berlin_driver/goodix_ts_core.c

+ 6 - 0
goodix_berlin_driver/goodix_ts_core.c

@@ -2272,6 +2272,9 @@ static int goodix_ts_suspend_helper(void *data)
 {
 	struct goodix_ts_core *core_data = data;
 
+	if (!core_data || core_module_prob_sate != CORE_MODULE_PROB_SUCCESS)
+		return 0;
+
 	return goodix_ts_suspend(core_data);
 }
 
@@ -2279,6 +2282,9 @@ static int goodix_ts_resume_helper(void *data)
 {
 	struct goodix_ts_core *core_data = data;
 
+	if (!core_data || core_module_prob_sate != CORE_MODULE_PROB_SUCCESS)
+		return 0;
+
 	return goodix_ts_resume(core_data);
 }