summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorishantvivek <ishantvivek1311@gmail.com>2016-11-21 06:05:47 (GMT)
committerIshant Vivek <ishantvivek1311@gmail.com>2016-11-23 12:24:47 (GMT)
commit4ebdf30fc76feef3b9e859b4091943e38decae0d (patch)
tree22c9cb6589ad2a8fe18ec8d3bad2f9bea88dfc71
parent7cfaf3f36fd7682a701bb8da98776457ff5cbfb4 (diff)
downloadandroid_hardware_samsung-cm-14.0.zip
android_hardware_samsung-cm-14.0.tar.gz
android_hardware_samsung-cm-14.0.tar.bz2
power: Update DT2W_PATHcm-14.0
* TARGET_TAP_TO_WAKE_NODE is defined in if condition. But in DT2W_PATH, TARGET_DT2W_PATH is defined. Why? * Use same flag for both, otherwise we need to define two flags for the dt2w path. * Use TARGET_TAP_TO_WAKE_NODE instead of TARGET_DT2W_PATH, for similarity with qcom powerHAL. Change-Id: I87cbdc3f2aa1a3f9f6509580f2c1f001129a0fda (cherry picked from commit 987dcca8254f68461016e700c8bd8c956eaac2e2)
-rw-r--r--power/Android.mk2
-rw-r--r--power/power.c4
2 files changed, 3 insertions, 3 deletions
diff --git a/power/Android.mk b/power/Android.mk
index cf968fc..aad3b9d 100644
--- a/power/Android.mk
+++ b/power/Android.mk
@@ -25,7 +25,7 @@ LOCAL_SRC_FILES := power.c
LOCAL_MODULE_TAGS := optional
ifneq ($(TARGET_TAP_TO_WAKE_NODE),)
- LOCAL_CFLAGS := -DDT2W_PATH=\"$(TARGET_DT2W_PATH)\"
+ LOCAL_CFLAGS := -DTARGET_TAP_TO_WAKE_NODE=\"$(TARGET_TAP_TO_WAKE_NODE)\"
endif
include $(BUILD_SHARED_LIBRARY)
diff --git a/power/power.c b/power/power.c
index f28dce5..364a563 100644
--- a/power/power.c
+++ b/power/power.c
@@ -508,10 +508,10 @@ static void samsung_set_feature(struct power_module *module, feature_t feature,
struct samsung_power_module *samsung_pwr = (struct samsung_power_module *) module;
switch (feature) {
-#ifdef DT2W_PATH
+#ifdef TARGET_TAP_TO_WAKE_NODE
case POWER_FEATURE_DOUBLE_TAP_TO_WAKE:
ALOGV("%s: %s double tap to wake", __func__, state ? "enabling" : "disabling");
- sysfs_write(DT2W_PATH, state > 0 ? "1" : "0");
+ sysfs_write(TARGET_TAP_TO_WAKE_NODE, state > 0 ? "1" : "0");
break;
#endif
default: