mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-25 22:23:14 -04:00
qcacmn: Use pm_wakeup_ws_event() for Kernels 4.12+
__pm_wakeup_event() was superseded in Linux kernel 4.12 by pm_wakup_ws_event(). Add conditional compilation to use the new API as appropriate. Change-Id: I8f6ceb6de24e1ffcc909f9417595d29d50968ebc CRs-Fixed: 2306603
This commit is contained in:
parent
d07cfa4b67
commit
79694bd003
1 changed files with 9 additions and 3 deletions
|
|
@ -315,7 +315,13 @@ qdf_export_symbol(qdf_wake_lock_acquire);
|
|||
* QDF status success: if wake lock is acquired
|
||||
* QDF status failure: if wake lock was not acquired
|
||||
*/
|
||||
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3, 10, 0))
|
||||
#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 12, 0)
|
||||
QDF_STATUS qdf_wake_lock_timeout_acquire(qdf_wake_lock_t *lock, uint32_t msec)
|
||||
{
|
||||
pm_wakeup_ws_event(lock, msec, true);
|
||||
return QDF_STATUS_SUCCESS;
|
||||
}
|
||||
#elif LINUX_VERSION_CODE >= KERNEL_VERSION(3, 10, 0)
|
||||
QDF_STATUS qdf_wake_lock_timeout_acquire(qdf_wake_lock_t *lock, uint32_t msec)
|
||||
{
|
||||
/* Wakelock for Rx is frequent.
|
||||
|
|
@ -324,12 +330,12 @@ QDF_STATUS qdf_wake_lock_timeout_acquire(qdf_wake_lock_t *lock, uint32_t msec)
|
|||
__pm_wakeup_event(lock, msec);
|
||||
return QDF_STATUS_SUCCESS;
|
||||
}
|
||||
#else
|
||||
#else /* LINUX_VERSION_CODE */
|
||||
QDF_STATUS qdf_wake_lock_timeout_acquire(qdf_wake_lock_t *lock, uint32_t msec)
|
||||
{
|
||||
return QDF_STATUS_SUCCESS;
|
||||
}
|
||||
#endif
|
||||
#endif /* LINUX_VERSION_CODE */
|
||||
qdf_export_symbol(qdf_wake_lock_timeout_acquire);
|
||||
|
||||
/**
|
||||
|
|
|
|||
Loading…
Reference in a new issue