diff options
Diffstat (limited to 'drivers/base')
-rw-r--r-- | drivers/base/power/main.c | 1 | ||||
-rw-r--r-- | drivers/base/power/wakeup.c | 2 | ||||
-rw-r--r-- | drivers/base/syscore.c | 2 |
3 files changed, 4 insertions, 1 deletions
diff --git a/drivers/base/power/main.c b/drivers/base/power/main.c index fbc5b6e7c591..abe3ab709e87 100644 --- a/drivers/base/power/main.c +++ b/drivers/base/power/main.c | |||
@@ -63,6 +63,7 @@ void device_pm_init(struct device *dev) | |||
63 | dev->power.wakeup = NULL; | 63 | dev->power.wakeup = NULL; |
64 | spin_lock_init(&dev->power.lock); | 64 | spin_lock_init(&dev->power.lock); |
65 | pm_runtime_init(dev); | 65 | pm_runtime_init(dev); |
66 | INIT_LIST_HEAD(&dev->power.entry); | ||
66 | } | 67 | } |
67 | 68 | ||
68 | /** | 69 | /** |
diff --git a/drivers/base/power/wakeup.c b/drivers/base/power/wakeup.c index 4573c83df6dd..abbbd33e8d8a 100644 --- a/drivers/base/power/wakeup.c +++ b/drivers/base/power/wakeup.c | |||
@@ -258,7 +258,7 @@ void device_set_wakeup_capable(struct device *dev, bool capable) | |||
258 | if (!!dev->power.can_wakeup == !!capable) | 258 | if (!!dev->power.can_wakeup == !!capable) |
259 | return; | 259 | return; |
260 | 260 | ||
261 | if (device_is_registered(dev)) { | 261 | if (device_is_registered(dev) && !list_empty(&dev->power.entry)) { |
262 | if (capable) { | 262 | if (capable) { |
263 | if (wakeup_sysfs_add(dev)) | 263 | if (wakeup_sysfs_add(dev)) |
264 | return; | 264 | return; |
diff --git a/drivers/base/syscore.c b/drivers/base/syscore.c index 90af2943f9e4..c126db3cb7d1 100644 --- a/drivers/base/syscore.c +++ b/drivers/base/syscore.c | |||
@@ -73,6 +73,7 @@ int syscore_suspend(void) | |||
73 | 73 | ||
74 | return ret; | 74 | return ret; |
75 | } | 75 | } |
76 | EXPORT_SYMBOL_GPL(syscore_suspend); | ||
76 | 77 | ||
77 | /** | 78 | /** |
78 | * syscore_resume - Execute all the registered system core resume callbacks. | 79 | * syscore_resume - Execute all the registered system core resume callbacks. |
@@ -95,6 +96,7 @@ void syscore_resume(void) | |||
95 | "Interrupts enabled after %pF\n", ops->resume); | 96 | "Interrupts enabled after %pF\n", ops->resume); |
96 | } | 97 | } |
97 | } | 98 | } |
99 | EXPORT_SYMBOL_GPL(syscore_resume); | ||
98 | #endif /* CONFIG_PM_SLEEP */ | 100 | #endif /* CONFIG_PM_SLEEP */ |
99 | 101 | ||
100 | /** | 102 | /** |