diff --git a/framework/model/input/driver/hdf_touch.c b/framework/model/input/driver/hdf_touch.c index 5b5fad444a0829bf9b0edc1b2c2ccb9a2c2c187d..52aec409c9d1e2ed0171c07cd927327df624d05c 100644 --- a/framework/model/input/driver/hdf_touch.c +++ b/framework/model/input/driver/hdf_touch.c @@ -1075,7 +1075,9 @@ static int HdfTouchDriverDozeResume(struct HdfDeviceObject *device) } HDF_LOGI("%s:called", __func__); #if GTP_ESD_PROTECT - Gt1xEsdSwitch(1); + if (gt1x_workqueue) { + Gt1xEsdSwitch(1); + } #endif SuspendFlag = 0; static int32_t isFirstResume = 1; @@ -1097,7 +1099,9 @@ static int HdfTouchDriverDozeSuspend(struct HdfDeviceObject *device) } HDF_LOGI("%s:called", __func__); #if GTP_ESD_PROTECT - Gt1xDeinitEsdProtect(); + if (gt1x_workqueue) { + Gt1xDeinitEsdProtect(); + } #endif SuspendFlag = 1; int32_t ret = -1;