summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGabriele M <moto.falcon.git@gmail.com>2017-04-03 00:00:00 +0200
committer5x <droidfivex@gmail.com>2017-04-29 21:58:39 +0900
commit7181aff70914c5bcdc09530b63425f660d24b929 (patch)
treed0c92252a29f11b0d850cbd6f879418a4eb9bb60
parenta73b666584a52efda81167baf1761b7a82ec4171 (diff)
power: Update for PerformanceManager changes
PerformanceManager is again compatible with AOSP, so undo part of the changes not to crash the HAL. This is a partial revert of a1e44b7593899bca8a0e27c9918205f45dcfbe33 (hammerhead: powerhal: dereference data pointer) Change-Id: Ifeaae04fff8cafb4df3becc87dfdbeae48006ee3
-rw-r--r--power/power_hammerhead.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/power/power_hammerhead.c b/power/power_hammerhead.c
index 4da41bc..d1fb6c5 100644
--- a/power/power_hammerhead.c
+++ b/power/power_hammerhead.c
@@ -350,7 +350,7 @@ static void power_hint( __attribute__((unused)) struct power_module *module,
break;
#if 0
case POWER_HINT_VSYNC:
- ALOGV("POWER_HINT_VSYNC %s", ((*(int32_t *)data) ? "ON" : "OFF"));
+ ALOGV("POWER_HINT_VSYNC %s", (data ? "ON" : "OFF"));
break;
#endif
case POWER_HINT_VIDEO_ENCODE:
@@ -359,7 +359,7 @@ static void power_hint( __attribute__((unused)) struct power_module *module,
case POWER_HINT_LOW_POWER:
pthread_mutex_lock(&low_power_mode_lock);
- if (*(int32_t *)data) {
+ if (data) {
low_power_mode = true;
for (cpu = 0; cpu < TOTAL_CPUS; cpu++) {
sysfs_write(cpu_path_min[cpu], LOW_POWER_MIN_FREQ);