summaryrefslogtreecommitdiffstats
path: root/power-8998.c
diff options
context:
space:
mode:
authordianlujitao <dianlujitao@lineageos.org>2018-01-20 22:19:17 +0800
committerLuca Stefani <luca.stefani.ge1@gmail.com>2018-02-08 14:32:32 +0000
commitd8022f68c1a50b6e14a15dc7c7ebe6a142491ae1 (patch)
tree9436ea895c946241cda63d51d4765aade25b6490 /power-8998.c
parentfed6fded0274dc450bb1b4e2c651c47f6b49c345 (diff)
downloadandroid_hardware_qcom_power-d8022f68c1a50b6e14a15dc7c7ebe6a142491ae1.tar.gz
android_hardware_qcom_power-d8022f68c1a50b6e14a15dc7c7ebe6a142491ae1.tar.bz2
android_hardware_qcom_power-d8022f68c1a50b6e14a15dc7c7ebe6a142491ae1.zip
power: msm8998: Fix perf mode switch
* Checking a pointer is NULL or not makes no sense, and as a result perf mode cannot be turned off. Fix it by checking the value. Change-Id: I4feb37da72b757631619e1aa2917f2a345a8032b
Diffstat (limited to 'power-8998.c')
-rw-r--r--power-8998.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/power-8998.c b/power-8998.c
index 78f604f..eba40b1 100644
--- a/power-8998.c
+++ b/power-8998.c
@@ -174,7 +174,7 @@ static int switch_mode(perf_mode_type_t mode) {
static int process_perf_hint(void *data, perf_mode_type_t mode) {
// enable
- if (data){
+ if (*(int32_t *)data){
ALOGI("Enable request for mode: 0x%x", mode);
// check if mode is current mode
if ( current_mode & mode ) {