qcacmn: Use wakeup_source_register when WAKEUP_SOURCE_DEV is def
Currently, the kernel APIs wakeup_source_register are used for kernel version 4.19.110 and higher in sync with the upstream kernel. But in downstream kernel, the same has been introduced from 4.19.80. To accommodate compatibility with both, use a downstream compiler flag to indicate when to use the kernel APIs. Change-Id: I7c2d439aa8c859d92b4bbdbdd5034861c0c98e75 CRs-Fixed: 2679523
This commit is contained in:

committed by
nshrivas

parent
a4b218d195
commit
3b4cb57737
@@ -265,7 +265,8 @@ qdf_export_symbol(qdf_wake_lock_name);
|
||||
* QDF status success: if wake lock is initialized
|
||||
* QDF status failure: if wake lock was not initialized
|
||||
*/
|
||||
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(4, 19, 110))
|
||||
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(4, 19, 110)) || \
|
||||
defined(WAKEUP_SOURCE_DEV)
|
||||
QDF_STATUS qdf_wake_lock_create(qdf_wake_lock_t *lock, const char *name)
|
||||
{
|
||||
qdf_mem_zero(lock, sizeof(*lock));
|
||||
@@ -388,7 +389,8 @@ qdf_export_symbol(qdf_wake_lock_release);
|
||||
* QDF status success: if wake lock is acquired
|
||||
* QDF status failure: if wake lock was not acquired
|
||||
*/
|
||||
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(4, 19, 110))
|
||||
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(4, 19, 110)) || \
|
||||
defined(WAKEUP_SOURCE_DEV)
|
||||
QDF_STATUS qdf_wake_lock_destroy(qdf_wake_lock_t *lock)
|
||||
{
|
||||
wakeup_source_unregister(lock->priv);
|
||||
|
Reference in New Issue
Block a user