qcacmn: Add conditional macros for creating/destroying wakelocks

Kernel 5.4 and 5.1 have removed the functions wakeup_source_init()
and wakeup_source_trash() respectively. Add conditional preprocessor
directives to use wakeup_source_register() and wakeup_source_unregister()
for Kernels 5.4 and 5.1 respectively.

Change-Id: I05597eb54b2988f7bc203b53427e17980a7473f9
CRs-Fixed: 2559016
diff --git a/qdf/linux/src/qdf_lock.c b/qdf/linux/src/qdf_lock.c
index 0c1b19c..6a541d4 100644
--- a/qdf/linux/src/qdf_lock.c
+++ b/qdf/linux/src/qdf_lock.c
@@ -265,7 +265,13 @@
  * QDF status success: if wake lock is initialized
  * QDF status failure: if wake lock was not initialized
  */
-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3, 10, 0))
+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(5, 4, 0))
+QDF_STATUS qdf_wake_lock_create(qdf_wake_lock_t *lock, const char *name)
+{
+	wakeup_source_register(lock->dev, name);
+	return QDF_STATUS_SUCCESS;
+}
+#elif (LINUX_VERSION_CODE >= KERNEL_VERSION(3, 10, 0))
 QDF_STATUS qdf_wake_lock_create(qdf_wake_lock_t *lock, const char *name)
 {
 	wakeup_source_init(lock, name);
@@ -373,7 +379,13 @@
  * 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(5, 1, 0))
+QDF_STATUS qdf_wake_lock_destroy(qdf_wake_lock_t *lock)
+{
+	wakeup_source_unregister(lock);
+	return QDF_STATUS_SUCCESS;
+}
+#elif (LINUX_VERSION_CODE >= KERNEL_VERSION(3, 10, 0))
 QDF_STATUS qdf_wake_lock_destroy(qdf_wake_lock_t *lock)
 {
 	wakeup_source_trash(lock);