From 5231c892e4461cf36e2c79ab6de67aa44d12148d Mon Sep 17 00:00:00 2001 From: Rafael Ortolan Date: Wed, 29 Jul 2020 15:02:39 -0300 Subject: [PATCH] ets_fps: Fix build error due to wakeup API changes On latest 4.14 kernel update, wakeup_source_register API has changed. Handle kernel versions properly. NO_PROP_NEEDED: Change-Id: I335af2e4849c1969eb2d365d4ef6bc4fc098a362 Reviewed-on: https://gerrit.mot.com/1709015 SLTApproved: Slta Waiver SME-Granted: SME Approvals Granted Tested-by: Jira Key Reviewed-by: Ling Jin Submit-Approved: Jira Key --- drivers/input/misc/ets_fps_mmi/ets_fps.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/input/misc/ets_fps_mmi/ets_fps.c b/drivers/input/misc/ets_fps_mmi/ets_fps.c index 82ae18146b09..4588541e4a86 100644 --- a/drivers/input/misc/ets_fps_mmi/ets_fps.c +++ b/drivers/input/misc/ets_fps_mmi/ets_fps.c @@ -1060,7 +1060,7 @@ static int etspi_probe(struct platform_device *pdev) wake_lock_init(&ets_wake_lock, WAKE_LOCK_SUSPEND, "ets_wake_lock"); #else #if (LINUX_VERSION_CODE >= KERNEL_VERSION(4, 19, 110) || \ - LINUX_VERSION_CODE >= KERNEL_VERSION(4, 14, 163)) + (LINUX_VERSION_CODE >= KERNEL_VERSION(4, 14, 163) && LINUX_VERSION_CODE < KERNEL_VERSION(4, 19, 0))) ets_wake_lock = wakeup_source_register(dev, "ets_wake_lock"); #else ets_wake_lock = wakeup_source_register("ets_wake_lock");