aw8695:Ensure wakeup_source API is compatible for all kernels

Updated wakeup_source API's need to be used for kernel_versions > 4.19.
Ensure to retain old wakeup_source API's for kernel_versions < 4.19.

ref.: https://gerrit.mot.com/#/c/1681553/

NO_PROP_NEEDED: applicable only to kernel_versions > 4.19

Change-Id: If7dc7924e584da29215b69027230856b0dc6e8c8
Reviewed-on: https://gerrit.mot.com/1685190
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: Sergio Vilela <sv008@motorola.com>
Submit-Approved: Sergio Vilela <sv008@motorola.com>
Tested-by: Sergio Vilela <sv008@motorola.com>
Reviewed-by: Ling Jin <lingjin@motorola.com>
This commit is contained in:
Gilberto Gambugge 2020-07-15 16:13:52 -03:00 • committed by Sergio Vilela
commit 1fa9b4b582

View file

@ -3294,7 +3294,11 @@ 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))
aw8695->ws = wakeup_source_register(aw8695->dev, "vibrator");
#else
aw8695->ws = wakeup_source_register("vibrator");
#endif
if (!aw8695->ws)
return -ENOMEM;