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