[Bugfix][T106BUG-224]acquire_wake_lock return is 0

Only Configure: No
Affected branch: master
Affected module: autosuspend
Is it affected on both ZXIC and MTK: only ZXIC
Self-test: Yes
Doc Update: No

Change-Id: Ied02e15d7bbb6ac25d232a451c539e0883828f2f
diff --git a/cap/zx297520v3/src/lynq/lib/liblynq-autosuspend/lynq-autosuspend.cpp b/cap/zx297520v3/src/lynq/lib/liblynq-autosuspend/lynq-autosuspend.cpp
index 54c88fd..ced8635 100644
--- a/cap/zx297520v3/src/lynq/lib/liblynq-autosuspend/lynq-autosuspend.cpp
+++ b/cap/zx297520v3/src/lynq/lib/liblynq-autosuspend/lynq-autosuspend.cpp
@@ -405,26 +405,27 @@
     int ret;
     printf("Get param:%s \n", name);
     ret = sc_pm_wakelock_lock(name);
-    if (ret)
+    if (ret != 0)
     {
         printf("do_wakelock failed, err:%d", ret);
-        return ret;
+        return -1;
     }
+
     printf("do_wakelock succeed\n");
-    return ret;
+    return 1;
 }
 int release_wake_lock(char *name)
 {
     int ret;
     printf("Get param:%s \n", name);
     ret = sc_pm_wakelock_unlock(name);
-    if (ret)
+    if (ret != 0)
     {
         printf("do_wakeunlock failed, err:%d", ret);
-        return ret;
+        return -1;
     }
     printf("do_wakeunlock succeed\n");
-    return ret;
+    return 1;
 }
 int lynq_set_lpmode(int lp_mode)
 {
diff --git a/cap/zx297520v3/src/lynq/lib/liblynq-qser-autosuspend/lynq-qser-autosuspend.cpp b/cap/zx297520v3/src/lynq/lib/liblynq-qser-autosuspend/lynq-qser-autosuspend.cpp
index 3ff2634..2a5ff52 100755
--- a/cap/zx297520v3/src/lynq/lib/liblynq-qser-autosuspend/lynq-qser-autosuspend.cpp
+++ b/cap/zx297520v3/src/lynq/lib/liblynq-qser-autosuspend/lynq-qser-autosuspend.cpp
@@ -301,6 +301,14 @@
     }
     ret = read_lock_table();
     ret = acquire_wake_lock( 0, lock_status.lock_name[fd]);
+    if(ret > 0)
+    {
+        ret = 0;
+    }
+    else
+    {
+        ret = -1;
+    }
     return ret;
 }
 
@@ -318,6 +326,14 @@
         return -1;
     }
     ret = release_wake_lock(lock_status.lock_name[fd]);
+    if(ret > 0)
+    {
+        ret = 0;
+    }
+    else
+    {
+        ret = -1;
+    }
     return ret;
 }