mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-11 23:24:22 -04:00
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:
parent
e5ae26a0b1
commit
7f7012991a
1 changed files with 4 additions and 0 deletions
|
|
@ -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;
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue