[PATCH 05/10] PM: Add option to disable /sys/power/state interface

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Signed-off-by: Arve Hjønnevåg <arve@xxxxxxxxxxx>--- kernel/power/Kconfig |    9 +++++++++ kernel/power/main.c  |    4 ++++ 2 files changed, 13 insertions(+), 0 deletions(-)
diff --git a/kernel/power/Kconfig b/kernel/power/Kconfigindex 6abd5f2..e784014 100644--- a/kernel/power/Kconfig+++ b/kernel/power/Kconfig@@ -133,6 +133,15 @@ config WAKELOCK_STAT 	---help--- 	  Report wake lock stats in /proc/wakelocks +config DISABLE_SYS_POWER_STATE+	bool "Disable /sys/power/state interface"+	depends on WAKELOCK+	default n+	---help---+	  The /sys/power/state interface does not respect wakelocks. If you+	  want to run user-space code that does not support wakelocks, do not+	  enable this option since it removes the interface.+ config USER_WAKELOCK 	bool "Userspace wake locks" 	depends on WAKELOCKdiff --git a/kernel/power/main.c b/kernel/power/main.cindex 8bdd15a..f22321d 100644--- a/kernel/power/main.c+++ b/kernel/power/main.c@@ -483,6 +483,7 @@ struct kobject *power_kobj;  *	proper enumerated value, and initiates a suspend transition.  */ +#ifndef CONFIG_DISABLE_SYS_POWER_STATE static ssize_t state_show(struct kobject *kobj, struct kobj_attribute *attr, 			  char *buf) {@@ -539,6 +540,7 @@ static ssize_t state_store(struct kobject *kobj, struct kobj_attribute *attr, }  power_attr(state);+#endif  /**  *	request_state - control system power state.@@ -622,7 +624,9 @@ power_attr(pm_trace); #endif /* CONFIG_PM_TRACE */  static struct attribute * g[] = {+#ifndef CONFIG_DISABLE_SYS_POWER_STATE 	&state_attr.attr,+#endif #ifdef CONFIG_WAKELOCK 	&request_state_attr.attr, #endif-- 1.6.1
_______________________________________________linux-pm mailing listlinux-pm@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx://lists.linux-foundation.org/mailman/listinfo/linux-pm


[Index of Archives]     [Linux ACPI]     [Netdev]     [Ethernet Bridging]     [Linux Wireless]     [CPU Freq]     [Kernel Newbies]     [Fedora Kernel]     [Security]     [Linux for Hams]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux Admin]     [Samba]

  Powered by Linux