awinic: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.

Change-Id: If5d90025486c944b85674098a28bf9c989f276bc
Reviewed-on: https://gerrit.mot.com/1681965
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:
amarenr 2020-07-14 17:05:35 +05:30 • committed by a7301c
commit 7f7012991a

View file

@ -4179,7 +4179,11 @@ static int aw8697_vibrator_init(struct aw8697 *aw8697)
pr_info("%s enter\n", __func__);
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(4, 19, 110))
aw8697->ws = wakeup_source_register(aw8697->dev, "vibrator");
#else
aw8697->ws = wakeup_source_register("vibrator");
#endif
if (!aw8697->ws)
return -ENOMEM;