diff --git a/drivers/input/misc/ets_fps_mmi/ets_fps.c b/drivers/input/misc/ets_fps_mmi/ets_fps.c index 4588541e4a86..c2aae9386d33 100644 --- a/drivers/input/misc/ets_fps_mmi/ets_fps.c +++ b/drivers/input/misc/ets_fps_mmi/ets_fps.c @@ -260,7 +260,7 @@ static irqreturn_t fp_eint_func(int irq, void *dev_id) #ifdef CONFIG_HAS_WAKELOCK wake_lock_timeout(&ets_wake_lock, msecs_to_jiffies(1500)); #else - __pm_wakeup_event(ets_wake_lock, 1500); + PM_WAKEUP_EVENT(ets_wake_lock, 1500); #endif #ifdef CONFIG_EGIS_DISPLAY_SPEED_UP if (is_auth_ready) @@ -283,7 +283,7 @@ static irqreturn_t fp_eint_func_ll(int irq, void *dev_id) #ifdef CONFIG_HAS_WAKELOCK wake_lock_timeout(&ets_wake_lock, msecs_to_jiffies(1500)); #else - __pm_wakeup_event(ets_wake_lock, 1500); + PM_WAKEUP_EVENT(ets_wake_lock, 1500); #endif return IRQ_RETVAL(IRQ_HANDLED); } @@ -977,7 +977,7 @@ static int etspi_remove(struct platform_device *pdev) #ifdef CONFIG_HAS_WAKELOCK wake_lock_destroy(&ets_wake_lock); #else - wakeup_source_unregister(ets_wake_lock); + PM_WAKEUP_UNREGISTER(ets_wake_lock); #endif del_timer_sync(&fps_ints.timer); etspi_create_device(etspi, false); @@ -1059,12 +1059,7 @@ static int etspi_probe(struct platform_device *pdev) #ifdef CONFIG_HAS_WAKELOCK wake_lock_init(&ets_wake_lock, WAKE_LOCK_SUSPEND, "ets_wake_lock"); #else -#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))) - ets_wake_lock = wakeup_source_register(dev, "ets_wake_lock"); -#else - ets_wake_lock = wakeup_source_register("ets_wake_lock"); -#endif + PM_WAKEUP_REGISTER(dev, ets_wake_lock, "ets_wake_lock"); if (!ets_wake_lock) { pr_err("%s : failed to allocate wakeup source\n", __func__); status = -ENOMEM; @@ -1095,7 +1090,7 @@ etspi_create_group_failed: #ifdef CONFIG_HAS_WAKELOCK wake_lock_destroy(&ets_wake_lock); #else - wakeup_source_unregister(ets_wake_lock); + PM_WAKEUP_UNREGISTER(ets_wake_lock); #endif #ifndef CONFIG_HAS_WAKELOCK etspi_register_wake_lock_failed: diff --git a/drivers/input/misc/ets_fps_mmi/ets_fps.h b/drivers/input/misc/ets_fps_mmi/ets_fps.h index 5b1cd1343104..3acc60848770 100644 --- a/drivers/input/misc/ets_fps_mmi/ets_fps.h +++ b/drivers/input/misc/ets_fps_mmi/ets_fps.h @@ -25,7 +25,7 @@ #include #include #include - +#include #ifdef FP_SPI_DEBUG #define DEBUG_PRINT(fmt, args...) pr_err(fmt, ## args)