mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-09 21:59:12 -04:00
aw8624: Fix build error due to wakeup API changes
On latest 4.14 kernel update, wakeup_source_register API has changed. Handle kernel versions properly. NO_PROP_NEEDED: <only applies to bo> Change-Id: I2a32c95ef6194ccba6704e0f90e0a609610fd445 Reviewed-on: https://gerrit.mot.com/1725210 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
bffb70175c
commit
c515a56926
1 changed files with 5 additions and 0 deletions
|
|
@ -3999,7 +3999,12 @@ aw8624_i2c_probe(struct i2c_client *i2c, const struct i2c_device_id *id)
|
|||
|
||||
g_aw8624 = aw8624;
|
||||
|
||||
#if ((LINUX_VERSION_CODE >= KERNEL_VERSION(4, 19, 110)) || \
|
||||
(LINUX_VERSION_CODE >= KERNEL_VERSION(4, 14, 163) && LINUX_VERSION_CODE < KERNEL_VERSION(4, 19, 0)))
|
||||
aw8624->ws = wakeup_source_register(aw8624->dev, "vibrator");
|
||||
#else
|
||||
aw8624->ws = wakeup_source_register("vibrator");
|
||||
#endif
|
||||
if (!aw8624->ws)
|
||||
return -ENOMEM;
|
||||
aw8624_vibrator_init(aw8624);
|
||||
|
|
|
|||
Loading…
Reference in a new issue