summaryrefslogtreecommitdiffstats
path: root/modules/power
diff options
context:
space:
mode:
authorColin Cross <ccross@android.com>2012-05-03 17:31:41 -0700
committerColin Cross <ccross@android.com>2012-05-03 19:01:02 -0700
commita3e364144cc258bbe94e7eb0a216e317a9e7e38d (patch)
treeac939e90f3b0bbe428b64562d9d11d85d3c16309 /modules/power
parentbcdb4cd34b9c2a4a3ccebf0048137892e5586fe8 (diff)
downloadhardware_libhardware-a3e364144cc258bbe94e7eb0a216e317a9e7e38d.zip
hardware_libhardware-a3e364144cc258bbe94e7eb0a216e317a9e7e38d.tar.gz
hardware_libhardware-a3e364144cc258bbe94e7eb0a216e317a9e7e38d.tar.bz2
remove triggering suspend from power hal
PowerManagerService will trigger suspend after calling into the power hal, remove it from here. Change-Id: I98cc096413bd5c9e39a28b2bfc376d3d30544193
Diffstat (limited to 'modules/power')
-rw-r--r--modules/power/power.c26
1 files changed, 0 insertions, 26 deletions
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 <hardware/hardware.h>
#include <hardware/power.h>
-/*
- * 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,