aw8695: 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: I2495957dd4cfec0313252af52ad5c50d8f6d1741
Reviewed-on: https://gerrit.mot.com/1709016
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:04:20 -03:00
commit 2eb5d0bf34

View file

@ -3295,7 +3295,7 @@ static int aw8695_vibrator_init(struct aw8695 *aw8695)
INIT_WORK(&aw8695->rtp_work, aw8695_rtp_work_routine);
#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)))
aw8695->ws = wakeup_source_register(aw8695->dev, "vibrator");
#else
aw8695->ws = wakeup_source_register("vibrator");