From 6a4a6ed8db6b1e9bb2e06e76f8a25d54c6aaf501 Mon Sep 17 00:00:00 2001 From: Rafael Ortolan Date: Tue, 28 Jul 2020 16:07:59 -0300 Subject: [PATCH] focaltech_0_flash: Fix build error due to wakeup API changes On latest 4.14 kernel update, wakeup_source_register API has changed. Update the code accordingly. NO_PROP_NEEDED: Change-Id: Ib29c5fee35ca97f2758435428e26b831fce64e6e Reviewed-on: https://gerrit.mot.com/1707929 SLTApproved: Slta Waiver SME-Granted: SME Approvals Granted Tested-by: Jira Key Reviewed-by: Ling Jin Submit-Approved: Jira Key --- .../input/touchscreen/focaltech_0flash_mmi/focaltech_gesture.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/input/touchscreen/focaltech_0flash_mmi/focaltech_gesture.c b/drivers/input/touchscreen/focaltech_0flash_mmi/focaltech_gesture.c index 79431d6ff477..d853caa33af9 100755 --- a/drivers/input/touchscreen/focaltech_0flash_mmi/focaltech_gesture.c +++ b/drivers/input/touchscreen/focaltech_0flash_mmi/focaltech_gesture.c @@ -651,7 +651,8 @@ int fts_gesture_init(struct fts_ts_data *ts_data) #ifdef CONFIG_HAS_WAKELOCK wake_lock_init(&gesture_wakelock, WAKE_LOCK_SUSPEND, "poll-wake-lock"); #else -#if (LINUX_VERSION_CODE >= KERNEL_VERSION(4, 19, 110)) +#if (LINUX_VERSION_CODE >= KERNEL_VERSION(4, 19, 110) || \ + LINUX_VERSION_CODE >= KERNEL_VERSION(4, 14, 163)) gesture_wakelock = wakeup_source_register(ts_data->dev, "poll-wake-lock"); #else gesture_wakelock = wakeup_source_register("poll-wake-lock");