Skip to content

Commit e762318

Browse files
committed
PM / Wakeup: Fix build warning related to the "wakeup" sysfs file
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>
1 parent a144c6a commit e762318

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

‎drivers/base/power/sysfs.c‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -212,8 +212,9 @@ static ssize_t autosuspend_delay_ms_store(struct device *dev,
212212
static DEVICE_ATTR(autosuspend_delay_ms, 0644, autosuspend_delay_ms_show,
213213
autosuspend_delay_ms_store);
214214

215-
#endif
215+
#endif /* CONFIG_PM_RUNTIME */
216216

217+
#ifdef CONFIG_PM_SLEEP
217218
static ssize_t
218219
wake_show(struct device * dev, struct device_attribute *attr, char * buf)
219220
{
@@ -248,7 +249,6 @@ wake_store(struct device * dev, struct device_attribute *attr,
248249

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

251-
#ifdef CONFIG_PM_SLEEP
252252
static ssize_t wakeup_count_show(struct device *dev,
253253
struct device_attribute *attr, char *buf)
254254
{

0 commit comments

Comments
 (0)