diff options
author | Colin Cross <ccross@android.com> | 2012-05-07 16:55:45 -0700 |
---|---|---|
committer | Android (Google) Code Review <android-gerrit@google.com> | 2012-05-07 16:55:45 -0700 |
commit | 36bf3d4008b8faae4c81dd6ad1a487d2e556330c (patch) | |
tree | af4fa6e6b1bf21e074b8a04534d1fb2608adfa7e | |
parent | d99f286d6d47b495c4bca008b0b8784d347e2082 (diff) | |
parent | d27d66ae058a619cb397b8eb4b43001d6a51ab70 (diff) | |
download | device_samsung_tuna-36bf3d4008b8faae4c81dd6ad1a487d2e556330c.zip device_samsung_tuna-36bf3d4008b8faae4c81dd6ad1a487d2e556330c.tar.gz device_samsung_tuna-36bf3d4008b8faae4c81dd6ad1a487d2e556330c.tar.bz2 |
Merge "tuna: remove triggering suspend from power hal" into jb-dev
-rw-r--r-- | power/power_tuna.c | 27 |
1 files changed, 0 insertions, 27 deletions
diff --git a/power/power_tuna.c b/power/power_tuna.c index d89249b..2eb580f 100644 --- a/power/power_tuna.c +++ b/power/power_tuna.c @@ -25,15 +25,6 @@ #include <hardware/hardware.h> #include <hardware/power.h> -/* - * Tuna uses the legacy interface for requesting early suspend and late resume. - */ - -#define LEGACY_SYS_POWER_STATE "/sys/power/state" - -static int sPowerStatefd; -static const char *pwr_states[] = { "mem", "on" }; - static void sysfs_write(char *path, char *s) { char buf[80]; @@ -57,15 +48,6 @@ static void sysfs_write(char *path, char *s) static void tuna_power_init(struct power_module *module) { - char buf[80]; - - sPowerStatefd = open(LEGACY_SYS_POWER_STATE, O_RDWR); - - if (sPowerStatefd < 0) { - strerror_r(errno, buf, sizeof(buf)); - ALOGE("Error opening %s: %s\n", LEGACY_SYS_POWER_STATE, buf); - } - /* * cpufreq interactive governor: timer 20ms, min sample 60ms, * hispeed 700MHz at load 50%, input boost enabled. @@ -86,9 +68,6 @@ static void tuna_power_init(struct power_module *module) static void tuna_power_set_interactive(struct power_module *module, int on) { - char buf[80]; - int len; - /* * Lower maximum frequency when screen is off. CPU 0 and 1 share a * cpufreq policy. @@ -96,12 +75,6 @@ static void tuna_power_set_interactive(struct power_module *module, int on) sysfs_write("/sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq", on ? "1200000" : "700000"); - - len = write(sPowerStatefd, pwr_states[!!on], strlen(pwr_states[!!on])); - if (len < 0) { - strerror_r(errno, buf, sizeof(buf)); - ALOGE("Error writing to %s: %s\n", LEGACY_SYS_POWER_STATE, buf); - } } static void tuna_power_hint(struct power_module *module, power_hint_t hint, |