From 1cbd43088c818d6d70817435737b1ec8bc3354fc Mon Sep 17 00:00:00 2001 From: Rafael Ortolan Date: Tue, 28 Jul 2020 16:10:20 -0300 Subject: [PATCH] aw8695: Fix build error due to wakeup API changes On latest 4.14 kernel update, wakeup_source_register API has changed. Update the code accordingly. NO_PROP_NEEDED: Change-Id: If28a0811fccb1cb62a9c23718081c70ddc34214d Reviewed-on: https://gerrit.mot.com/1707930 SLTApproved: Slta Waiver SME-Granted: SME Approvals Granted Tested-by: Jira Key Reviewed-by: Ling Jin Submit-Approved: Jira Key --- drivers/misc/awinic/aw8695/aw8695.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/misc/awinic/aw8695/aw8695.c b/drivers/misc/awinic/aw8695/aw8695.c index 69a8c2e02481..b9600bf8b8ef 100644 --- a/drivers/misc/awinic/aw8695/aw8695.c +++ b/drivers/misc/awinic/aw8695/aw8695.c @@ -3294,7 +3294,8 @@ 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)) +#if (LINUX_VERSION_CODE >= KERNEL_VERSION(4, 19, 110) || \ + LINUX_VERSION_CODE >= KERNEL_VERSION(4, 14, 163)) aw8695->ws = wakeup_source_register(aw8695->dev, "vibrator"); #else aw8695->ws = wakeup_source_register("vibrator");