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:
Gilberto Gambugge 2020-08-16 10:35:09 -03:00 • committed by Gilberto Gambugge Neto
commit c515a56926

View file

@ -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);