nt36xxx: 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: I57a38470f79e29b406ec578b52f624f1bf39beae
Reviewed-on: https://gerrit.mot.com/1725211
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:
Gilberto Gambugge 2020-08-16 10:36:03 -03:00 • committed by Gilberto Gambugge Neto
commit bffb70175c

View file

@ -2011,7 +2011,8 @@ static int32_t nvt_ts_probe(struct spi_device *client)
#ifdef CONFIG_HAS_WAKELOCK
wake_lock_init(&gesture_wakelock, WAKE_LOCK_SUSPEND, "dt-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) && LINUX_VERSION_CODE < KERNEL_VERSION(4, 19, 0)))
gesture_wakelock = wakeup_source_register(&client->dev, "dt-wake-lock");
#else
gesture_wakelock = wakeup_source_register("dt-wake-lock");