Skip to content

Commit

Permalink
PM / Wakeup: Fix build warning related to the "wakeup" sysfs file
Browse files Browse the repository at this point in the history
The "wakeup" device sysfs file is only created if CONFIG_PM_SLEEP
is set, so put it under CONFIG_PM_SLEEP and make a build warning
related to it go away.

Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
Acked-by: Greg Kroah-Hartman <gregkh@suse.de>
  • Loading branch information
Rafael J. Wysocki committed May 17, 2011
1 parent a144c6a commit e762318
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions drivers/base/power/sysfs.c
Original file line number Diff line number Diff line change
Expand Up @@ -212,8 +212,9 @@ static ssize_t autosuspend_delay_ms_store(struct device *dev,
static DEVICE_ATTR(autosuspend_delay_ms, 0644, autosuspend_delay_ms_show,
autosuspend_delay_ms_store);

#endif
#endif /* CONFIG_PM_RUNTIME */

#ifdef CONFIG_PM_SLEEP
static ssize_t
wake_show(struct device * dev, struct device_attribute *attr, char * buf)
{
Expand Down Expand Up @@ -248,7 +249,6 @@ wake_store(struct device * dev, struct device_attribute *attr,

static DEVICE_ATTR(wakeup, 0644, wake_show, wake_store);

#ifdef CONFIG_PM_SLEEP
static ssize_t wakeup_count_show(struct device *dev,
struct device_attribute *attr, char *buf)
{
Expand Down

0 comments on commit e762318

Please sign in to comment.