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: <only applies to bo>

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 <lingjin@motorola.com>
Submit-Approved: Jira Key
This commit is contained in:
Rafael Ortolan 2020-07-29 15:02:39 -03:00
commit 5231c892e4

View file

@ -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");