diff options
| author | Simon Shields <keepcalm444@gmail.com> | 2016-12-16 21:25:25 -0600 |
|---|---|---|
| committer | Izumi Inami <droidfivex@gmail.com> | 2017-02-07 01:15:15 +0000 |
| commit | e9974945ba0b1a5c0757d5edaa169a69ade3a3d9 (patch) | |
| tree | 6bac4126ab6e844baee90629bc4c3ec624a11644 | |
| parent | 6d8913f5934a0e633c3d7e70c6c0da139a6471f2 (diff) | |
mako: powerhal: dereference data pointer
Solves the issue of being stuck in low_power_mode after disabling
battery saver mode.
Change-Id: Ie96d44e564679b11aa122fadb34f6d1ac21a5700
| -rw-r--r-- | power/power_mako.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/power/power_mako.c b/power/power_mako.c index 0d5e1e1..9b33a77 100644 --- a/power/power_mako.c +++ b/power/power_mako.c @@ -339,7 +339,7 @@ static void power_set_interactive(__attribute__((unused)) struct power_module *m } static void power_hint( __attribute__((unused)) struct power_module *module, - power_hint_t hint, __attribute__((unused)) void *data) + power_hint_t hint, void *data) { int cpu, ret; @@ -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", (data ? "ON" : "OFF")); + ALOGV("POWER_HINT_VSYNC %s", ((*(int32_t *)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 (data) { + if (*(int32_t *)data) { low_power_mode = true; for (cpu = 0; cpu < TOTAL_CPUS; cpu++) { sysfs_write(cpu_path_min[cpu], LOW_POWER_MIN_FREQ); |
