From a3e364144cc258bbe94e7eb0a216e317a9e7e38d Mon Sep 17 00:00:00 2001 From: Colin Cross Date: Thu, 3 May 2012 17:31:41 -0700 Subject: remove triggering suspend from power hal PowerManagerService will trigger suspend after calling into the power hal, remove it from here. Change-Id: I98cc096413bd5c9e39a28b2bfc376d3d30544193 --- modules/power/power.c | 26 -------------------------- 1 file changed, 26 deletions(-) (limited to 'modules/power') diff --git a/modules/power/power.c b/modules/power/power.c index 4b9457f..7cacc09 100644 --- a/modules/power/power.c +++ b/modules/power/power.c @@ -25,38 +25,12 @@ #include #include -/* - * This module implements 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 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); - } } static void power_set_interactive(struct power_module *module, int on) { - char buf[80]; - int len; - - 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 power_hint(struct power_module *module, power_hint_t hint, -- cgit v1.1