summaryrefslogtreecommitdiffstats
path: root/drivers/base/power/sysfs.c
diff options
context:
space:
mode:
authorDavid Brownell <david-b@pacbell.net>2006-08-30 13:54:36 -0700
committerGreg Kroah-Hartman <gregkh@suse.de>2006-09-25 21:08:37 -0700
commit2bca293e56b6a8cd16bb6e70a09b2adac9c723b5 (patch)
treea67697a05fa718a2a03b603d8afbdcbae41d68bc /drivers/base/power/sysfs.c
parent047bda36150d11422b2c7bacca1df324c909c0b3 (diff)
downloadop-kernel-dev-2bca293e56b6a8cd16bb6e70a09b2adac9c723b5.zip
op-kernel-dev-2bca293e56b6a8cd16bb6e70a09b2adac9c723b5.tar.gz
PM: add kconfig option for deprecated .../power/state files
Add a new PM_SYSFS_DEPRECATED config option to control whether or not the /sys/devices/.../power/state files are provided. This will make it easier to get rid of that mechanism when the time comes, and to verify that userspace tools work right without it. Signed-off-by: David Brownell <dbrownell@users.sourceforge.net> Acked-by: Pavel Machek <pavel@suse.cz> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/base/power/sysfs.c')
-rw-r--r--drivers/base/power/sysfs.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/drivers/base/power/sysfs.c b/drivers/base/power/sysfs.c
index e55b3c2..2d47517 100644
--- a/drivers/base/power/sysfs.c
+++ b/drivers/base/power/sysfs.c
@@ -7,6 +7,8 @@
#include "power.h"
+#ifdef CONFIG_PM_SYSFS_DEPRECATED
+
/**
* state - Control current power state of device
*
@@ -66,6 +68,8 @@ static ssize_t state_store(struct device * dev, struct device_attribute *attr, c
static DEVICE_ATTR(state, 0644, state_show, state_store);
+#endif /* CONFIG_PM_SYSFS_DEPRECATED */
+
/*
* wakeup - Report/change current wakeup option for device
*
@@ -139,7 +143,9 @@ static DEVICE_ATTR(wakeup, 0644, wake_show, wake_store);
static struct attribute * power_attrs[] = {
+#ifdef CONFIG_PM_SYSFS_DEPRECATED
&dev_attr_state.attr,
+#endif
&dev_attr_wakeup.attr,
NULL,
};
OpenPOWER on IntegriCloud