Revert "ledtrig-sleep: Add led trigger for sleep debugging."
author黄涛 <huangtao@rock-chips.com>
Sat, 30 Jul 2011 14:57:55 +0000 (22:57 +0800)
committer黄涛 <huangtao@rock-chips.com>
Sat, 30 Jul 2011 14:57:55 +0000 (22:57 +0800)
This reverts commit 2ec68be75c83c832913acb8756daec7d37aae067.

drivers/leds/Kconfig
drivers/leds/Makefile
drivers/leds/ledtrig-sleep.c [deleted file]

index a4e8e8fe4bedd3e1e84a2f16b7bb506c2c88469c..02535a0eadd0567ca06536c5d880b66e53764947 100755 (executable)
@@ -316,12 +316,6 @@ config LEDS_TRIGGER_DEFAULT_ON
          This allows LEDs to be initialised in the ON state.
          If unsure, say Y.
 
-config LEDS_TRIGGER_SLEEP
-       tristate "LED Sleep Mode Trigger"
-       depends on LEDS_TRIGGERS && HAS_EARLYSUSPEND
-       help
-         This turns LEDs on when the screen is off but the cpu still running.
-
 comment "iptables trigger is under Netfilter config (LED target)"
        depends on LEDS_TRIGGERS
 
index ace2dc6541e1072b5f9a13294a76f36d2f10c255..6adf8eb2b67d64228a64e031e76e0ddb15354ee3 100755 (executable)
@@ -42,4 +42,3 @@ obj-$(CONFIG_LEDS_TRIGGER_HEARTBEAT)  += ledtrig-heartbeat.o
 obj-$(CONFIG_LEDS_TRIGGER_BACKLIGHT)   += ledtrig-backlight.o
 obj-$(CONFIG_LEDS_TRIGGER_GPIO)                += ledtrig-gpio.o
 obj-$(CONFIG_LEDS_TRIGGER_DEFAULT_ON)  += ledtrig-default-on.o
-obj-$(CONFIG_LEDS_TRIGGER_SLEEP)       += ledtrig-sleep.o
diff --git a/drivers/leds/ledtrig-sleep.c b/drivers/leds/ledtrig-sleep.c
deleted file mode 100644 (file)
index f164042..0000000
+++ /dev/null
@@ -1,80 +0,0 @@
-/* drivers/leds/ledtrig-sleep.c
- *
- * Copyright (C) 2007 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/earlysuspend.h>
-#include <linux/leds.h>
-#include <linux/suspend.h>
-
-static int ledtrig_sleep_pm_callback(struct notifier_block *nfb,
-                                       unsigned long action,
-                                       void *ignored);
-
-DEFINE_LED_TRIGGER(ledtrig_sleep)
-static struct notifier_block ledtrig_sleep_pm_notifier = {
-       .notifier_call = ledtrig_sleep_pm_callback,
-       .priority = 0,
-};
-
-static void ledtrig_sleep_early_suspend(struct early_suspend *h)
-{
-       led_trigger_event(ledtrig_sleep, LED_FULL);
-}
-
-static void ledtrig_sleep_early_resume(struct early_suspend *h)
-{
-       led_trigger_event(ledtrig_sleep, LED_OFF);
-}
-
-static struct early_suspend ledtrig_sleep_early_suspend_handler = {
-       .suspend = ledtrig_sleep_early_suspend,
-       .resume = ledtrig_sleep_early_resume,
-};
-
-static int ledtrig_sleep_pm_callback(struct notifier_block *nfb,
-                                       unsigned long action,
-                                       void *ignored)
-{
-       switch (action) {
-       case PM_HIBERNATION_PREPARE:
-       case PM_SUSPEND_PREPARE:
-               led_trigger_event(ledtrig_sleep, LED_OFF);
-               return NOTIFY_OK;
-       case PM_POST_HIBERNATION:
-       case PM_POST_SUSPEND:
-               led_trigger_event(ledtrig_sleep, LED_FULL);
-               return NOTIFY_OK;
-       }
-
-       return NOTIFY_DONE;
-}
-
-static int __init ledtrig_sleep_init(void)
-{
-       led_trigger_register_simple("sleep", &ledtrig_sleep);
-       register_pm_notifier(&ledtrig_sleep_pm_notifier);
-       register_early_suspend(&ledtrig_sleep_early_suspend_handler);
-       return 0;
-}
-
-static void __exit ledtrig_sleep_exit(void)
-{
-       unregister_early_suspend(&ledtrig_sleep_early_suspend_handler);
-       unregister_pm_notifier(&ledtrig_sleep_pm_notifier);
-       led_trigger_unregister_simple(ledtrig_sleep);
-}
-
-module_init(ledtrig_sleep_init);
-module_exit(ledtrig_sleep_exit);
-