From 9061c0b31d5138692ddfa267df65cfe79a2e7add Mon Sep 17 00:00:00 2001 From: litong20 Date: Wed, 26 May 2021 17:45:20 +0800 Subject: [PATCH] Add NVT_SET_TOUCH_STATE to avoid compilation errors TP: The touch_set_state function will only be used when the NVT_SET_TOUCH_STATE configuration is enabled. So add the configuration to avoid compilation errors. Change-Id: I832362899339c3465f475c13bb654a73216d8e9c Reviewed-on: https://gerrit.mot.com/1960799 SME-Granted: SME Approvals Granted SLTApproved: Slta Waiver Tested-by: Jira Key Reviewed-by: Jichao Zou Submit-Approved: Jira Key --- drivers/input/touchscreen/nova_0flash_mmi/nt36xxx_mmi_class.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/drivers/input/touchscreen/nova_0flash_mmi/nt36xxx_mmi_class.c b/drivers/input/touchscreen/nova_0flash_mmi/nt36xxx_mmi_class.c index 0ae794f17479..b4571875405a 100644 --- a/drivers/input/touchscreen/nova_0flash_mmi/nt36xxx_mmi_class.c +++ b/drivers/input/touchscreen/nova_0flash_mmi/nt36xxx_mmi_class.c @@ -186,13 +186,17 @@ static int nvt_mmi_panel_state(struct device *dev, NVT_LOG("panel state change: %d->%d\n", from, to); switch (to) { case TS_MMI_PM_GESTURE: +#ifdef NVT_SET_TOUCH_STATE ts->gesture_enabled = true; touch_set_state(TS_MMI_PM_GESTURE, TOUCH_PANEL_IDX_PRIMARY); +#endif break; case TS_MMI_PM_DEEPSLEEP: +#ifdef NVT_SET_TOUCH_STATE ts->gesture_enabled = false; touch_set_state(TS_MMI_PM_DEEPSLEEP, TOUCH_PANEL_IDX_PRIMARY); +#endif break; case TS_MMI_PM_ACTIVE: