From 835332a3cc273324b102bf4b5973f073b06fce93 Mon Sep 17 00:00:00 2001 From: Colin Cross Date: Thu, 3 May 2012 17:29:04 -0700 Subject: tuna: remove triggering suspend from power hal PowerManagerService will trigger suspend after calling into the power hal, remove it from here. Change-Id: I9c6bc42f8615d047000295fb8b100e32c4e46318 --- power/power_tuna.c | 27 --------------------------- 1 file changed, 27 deletions(-) (limited to 'power') 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 #include -/* - * 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, -- cgit v1.1