summaryrefslogtreecommitdiff
path: root/drivers/leds
diff options
context:
space:
mode:
authorVarun Wadekar <vwadekar@nvidia.com>2012-07-25 10:02:51 +0530
committerVarun Wadekar <vwadekar@nvidia.com>2012-07-25 10:05:47 +0530
commit02768f968ba675f43013db002fe9773957cc61c5 (patch)
treeadbce46f1525763caec6bba06e26bcbee4c74040 /drivers/leds
parent2601fc1aa98f41be9f0db060ac80f609d9effb96 (diff)
pm: remove early_suspend/late_resume uses
Android kernel based on kernel v3.4, no longer uses early_suspend and late_resume states. Bug 959487 Change-Id: Ib2b50b91ee550824a1082046a37ba25fc98eef84 Signed-off-by: Varun Wadekar <vwadekar@nvidia.com>
Diffstat (limited to 'drivers/leds')
-rw-r--r--drivers/leds/Kconfig6
-rw-r--r--drivers/leds/Makefile1
-rw-r--r--drivers/leds/ledtrig-sleep.c80
3 files changed, 0 insertions, 87 deletions
diff --git a/drivers/leds/Kconfig b/drivers/leds/Kconfig
index ef2ddd41a6d8..ff4b8cfda585 100644
--- a/drivers/leds/Kconfig
+++ b/drivers/leds/Kconfig
@@ -468,12 +468,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
diff --git a/drivers/leds/Makefile b/drivers/leds/Makefile
index 9d3b1094697a..890481cb09f6 100644
--- a/drivers/leds/Makefile
+++ b/drivers/leds/Makefile
@@ -56,4 +56,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
index f16404212152..000000000000
--- a/drivers/leds/ledtrig-sleep.c
+++ /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);
-