Fix deprecated function call on ilitek_0flash_mmi
Qcom ported a patch to kernel 4.19 which removes the unused function wakeup_source_init. Fix ilitek_0flash_mmi module to use wakeup source macros instead. Change-Id: I737205699d192e357f96ff5a95f8fb06401547fd Signed-off-by: Tiago Ganselli <ganselli@motorola.com> Reviewed-on: https://gerrit.mot.com/1859417 SLTApproved: Slta Waiver SME-Granted: SME Approvals Granted Tested-by: Jira Key Reviewed-by: Rafael Ortolan <rafones@motorola.com> Reviewed-by: Zhenxin Xi <xizx@motorola.com> Submit-Approved: Jira Key
This commit is contained in:
parent
28fb1cfc62
commit
94ce512857
3 changed files with 11 additions and 3 deletions
|
@ -924,7 +924,7 @@ struct ilitek_ts_data {
|
|||
#ifdef CONFIG_HAS_WAKELOCK
|
||||
struct wake_lock gesture_wakelock;
|
||||
#else
|
||||
struct wakeup_source gesture_wakelock;
|
||||
struct wakeup_source *gesture_wakelock;
|
||||
#endif
|
||||
#endif
|
||||
|
||||
|
|
|
@ -987,7 +987,11 @@ static int ilitek_plat_probe(void)
|
|||
#ifdef CONFIG_HAS_WAKELOCK
|
||||
wake_lock_init(&(ilits->gesture_wakelock), WAKE_LOCK_SUSPEND, "dt-wake-lock");
|
||||
#else
|
||||
wakeup_source_init(&(ilits->gesture_wakelock), "dt-wake-lock");
|
||||
PM_WAKEUP_REGISTER(ilits->dev, ilits->gesture_wakelock, "dt-wake-lock");
|
||||
if (!ilits->gesture_wakelock) {
|
||||
ILI_ERR("ILITEK Driver failed to load. wakeup_source_init failed.");
|
||||
return -ENOMEM;
|
||||
}
|
||||
#endif
|
||||
if (!ili_sensor_init(ilits))
|
||||
initialized_sensor = true;
|
||||
|
@ -1016,6 +1020,10 @@ static int ilitek_tp_pm_resume(struct device *dev)
|
|||
static int ilitek_plat_remove(void)
|
||||
{
|
||||
ILI_INFO("remove plat dev\n");
|
||||
#ifndef CONFIG_HAS_WAKELOCK
|
||||
if(ilits->gesture_wakelock)
|
||||
PM_WAKEUP_UNREGISTER(ilits->gesture_wakelock);
|
||||
#endif
|
||||
ili_dev_remove();
|
||||
return 0;
|
||||
}
|
||||
|
|
|
@ -1159,7 +1159,7 @@ void ili_report_gesture_mode(u8 *buf, int len)
|
|||
#ifdef CONFIG_HAS_WAKELOCK
|
||||
wake_lock_timeout(&(ilits->gesture_wakelock), msecs_to_jiffies(5000));
|
||||
#else
|
||||
__pm_wakeup_event(&(ilits->gesture_wakelock), 5000);
|
||||
PM_WAKEUP_EVENT(ilits->gesture_wakelock, 5000);
|
||||
#endif
|
||||
#else
|
||||
input_report_key(input, KEY_GESTURE_POWER, 1);
|
||||
|
|
Loading…
Reference in a new issue