summaryrefslogtreecommitdiff
path: root/kernel
diff options
context:
space:
mode:
authorVarun Wadekar <vwadekar@nvidia.com>2012-07-23 13:33:06 +0530
committerVarun Wadekar <vwadekar@nvidia.com>2012-07-23 13:33:06 +0530
commit42511dd658956ca5481dafcc1ef639eed9324359 (patch)
tree177b795f88b3b71f64a2d13b20c67e0f1301d28d /kernel
parent775625961b9578e347058b998e6088f45f9d1d9e (diff)
Revert "PM: Enable partial support for FB earlysuspend"
This reverts commit 8ceec9456c21f55785c751bf76e080599cf508f3. Signed-off-by: Varun Wadekar <vwadekar@nvidia.com>
Diffstat (limited to 'kernel')
-rw-r--r--kernel/power/Makefile1
-rw-r--r--kernel/power/fbearlysuspend.c114
2 files changed, 0 insertions, 115 deletions
diff --git a/kernel/power/Makefile b/kernel/power/Makefile
index 06f947284ce7..7f51f84d530c 100644
--- a/kernel/power/Makefile
+++ b/kernel/power/Makefile
@@ -12,5 +12,4 @@ obj-$(CONFIG_HIBERNATION) += hibernate.o snapshot.o swap.o user.o \
obj-$(CONFIG_USER_WAKELOCK) += userwakelock.o
obj-$(CONFIG_SUSPEND_TIME) += suspend_time.o
-obj-y += fbearlysuspend.o
obj-$(CONFIG_MAGIC_SYSRQ) += poweroff.o
diff --git a/kernel/power/fbearlysuspend.c b/kernel/power/fbearlysuspend.c
deleted file mode 100644
index 571b51a51175..000000000000
--- a/kernel/power/fbearlysuspend.c
+++ /dev/null
@@ -1,114 +0,0 @@
-/* kernel/power/fbearlysuspend.c
- *
- * Copyright (C) 2005-2008 Google, Inc.
- *
- * This software is licensed under the terms of the GNU General Public
- * License version 2, as published by the Free Software Foundation, and
- * may be copied, distributed, and modified under those terms.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- */
-
-#include <linux/module.h>
-#include <linux/wait.h>
-
-#include "power.h"
-
-static wait_queue_head_t fb_state_wq;
-static DEFINE_SPINLOCK(fb_state_lock);
-static enum {
- FB_STATE_STOPPED_DRAWING,
- FB_STATE_REQUEST_STOP_DRAWING,
- FB_STATE_DRAWING_OK,
-} fb_state;
-
-static ssize_t wait_for_fb_sleep_show(struct kobject *kobj,
- struct kobj_attribute *attr, char *buf)
-{
- char *s = buf;
- int ret;
-
- ret = wait_event_interruptible(fb_state_wq,
- fb_state != FB_STATE_DRAWING_OK);
- if (ret && fb_state == FB_STATE_DRAWING_OK)
- return ret;
- else
- s += sprintf(buf, "sleeping");
- return s - buf;
-}
-
-static ssize_t wait_for_fb_wake_show(struct kobject *kobj,
- struct kobj_attribute *attr, char *buf)
-{
- char *s = buf;
- int ret;
- unsigned long irq_flags;
-
- spin_lock_irqsave(&fb_state_lock, irq_flags);
- if (fb_state == FB_STATE_REQUEST_STOP_DRAWING) {
- fb_state = FB_STATE_STOPPED_DRAWING;
- wake_up(&fb_state_wq);
- }
- spin_unlock_irqrestore(&fb_state_lock, irq_flags);
-
- ret = wait_event_interruptible(fb_state_wq,
- fb_state == FB_STATE_DRAWING_OK);
- if (ret && fb_state != FB_STATE_DRAWING_OK)
- return ret;
- else
- s += sprintf(buf, "awake");
-
- return s - buf;
-}
-
-#define power_ro_attr(_name) \
-static struct kobj_attribute _name##_attr = { \
- .attr = { \
- .name = __stringify(_name), \
- .mode = 0444, \
- }, \
- .show = _name##_show, \
- .store = NULL, \
-}
-
-power_ro_attr(wait_for_fb_sleep);
-power_ro_attr(wait_for_fb_wake);
-
-static struct attribute *g[] = {
- &wait_for_fb_sleep_attr.attr,
- &wait_for_fb_wake_attr.attr,
- NULL,
-};
-
-static struct attribute_group attr_group = {
- .attrs = g,
-};
-
-static int __init android_power_init(void)
-{
- int ret;
-
- init_waitqueue_head(&fb_state_wq);
- fb_state = FB_STATE_DRAWING_OK;
-
- ret = sysfs_create_group(power_kobj, &attr_group);
- if (ret) {
- pr_err("android_power_init: sysfs_create_group failed\n");
- return ret;
- }
-
- return 0;
-}
-
-static void __exit android_power_exit(void)
-{
- sysfs_remove_group(power_kobj, &attr_group);
-}
-
-module_init(android_power_init);
-module_exit(android_power_exit);
-