diff options
| -rw-r--r-- | drivers/base/power/wakeup.c | 18 | ||||
| -rw-r--r-- | include/linux/pm_wakeup.h | 9 |
2 files changed, 1 insertions, 26 deletions
diff --git a/drivers/base/power/wakeup.c b/drivers/base/power/wakeup.c index a25d2d82f44d..ecbe152d151f 100644 --- a/drivers/base/power/wakeup.c +++ b/drivers/base/power/wakeup.c | |||
| @@ -106,22 +106,6 @@ struct wakeup_source *wakeup_source_create(const char *name) | |||
| 106 | } | 106 | } |
| 107 | EXPORT_SYMBOL_GPL(wakeup_source_create); | 107 | EXPORT_SYMBOL_GPL(wakeup_source_create); |
| 108 | 108 | ||
| 109 | /** | ||
| 110 | * wakeup_source_drop - Prepare a struct wakeup_source object for destruction. | ||
| 111 | * @ws: Wakeup source to prepare for destruction. | ||
| 112 | * | ||
| 113 | * Callers must ensure that __pm_stay_awake() or __pm_wakeup_event() will never | ||
| 114 | * be run in parallel with this function for the same wakeup source object. | ||
| 115 | */ | ||
| 116 | void wakeup_source_drop(struct wakeup_source *ws) | ||
| 117 | { | ||
| 118 | if (!ws) | ||
| 119 | return; | ||
| 120 | |||
| 121 | __pm_relax(ws); | ||
| 122 | } | ||
| 123 | EXPORT_SYMBOL_GPL(wakeup_source_drop); | ||
| 124 | |||
| 125 | /* | 109 | /* |
| 126 | * Record wakeup_source statistics being deleted into a dummy wakeup_source. | 110 | * Record wakeup_source statistics being deleted into a dummy wakeup_source. |
| 127 | */ | 111 | */ |
| @@ -161,7 +145,7 @@ void wakeup_source_destroy(struct wakeup_source *ws) | |||
| 161 | if (!ws) | 145 | if (!ws) |
| 162 | return; | 146 | return; |
| 163 | 147 | ||
| 164 | wakeup_source_drop(ws); | 148 | __pm_relax(ws); |
| 165 | wakeup_source_record(ws); | 149 | wakeup_source_record(ws); |
| 166 | kfree_const(ws->name); | 150 | kfree_const(ws->name); |
| 167 | kfree(ws); | 151 | kfree(ws); |
diff --git a/include/linux/pm_wakeup.h b/include/linux/pm_wakeup.h index 4238dde0aaf0..0ff134d6575a 100644 --- a/include/linux/pm_wakeup.h +++ b/include/linux/pm_wakeup.h | |||
| @@ -96,7 +96,6 @@ static inline void device_set_wakeup_path(struct device *dev) | |||
| 96 | /* drivers/base/power/wakeup.c */ | 96 | /* drivers/base/power/wakeup.c */ |
| 97 | extern void wakeup_source_prepare(struct wakeup_source *ws, const char *name); | 97 | extern void wakeup_source_prepare(struct wakeup_source *ws, const char *name); |
| 98 | extern struct wakeup_source *wakeup_source_create(const char *name); | 98 | extern struct wakeup_source *wakeup_source_create(const char *name); |
| 99 | extern void wakeup_source_drop(struct wakeup_source *ws); | ||
| 100 | extern void wakeup_source_destroy(struct wakeup_source *ws); | 99 | extern void wakeup_source_destroy(struct wakeup_source *ws); |
| 101 | extern void wakeup_source_add(struct wakeup_source *ws); | 100 | extern void wakeup_source_add(struct wakeup_source *ws); |
| 102 | extern void wakeup_source_remove(struct wakeup_source *ws); | 101 | extern void wakeup_source_remove(struct wakeup_source *ws); |
| @@ -134,8 +133,6 @@ static inline struct wakeup_source *wakeup_source_create(const char *name) | |||
| 134 | return NULL; | 133 | return NULL; |
| 135 | } | 134 | } |
| 136 | 135 | ||
| 137 | static inline void wakeup_source_drop(struct wakeup_source *ws) {} | ||
| 138 | |||
| 139 | static inline void wakeup_source_destroy(struct wakeup_source *ws) {} | 136 | static inline void wakeup_source_destroy(struct wakeup_source *ws) {} |
| 140 | 137 | ||
| 141 | static inline void wakeup_source_add(struct wakeup_source *ws) {} | 138 | static inline void wakeup_source_add(struct wakeup_source *ws) {} |
| @@ -204,12 +201,6 @@ static inline void wakeup_source_init(struct wakeup_source *ws, | |||
| 204 | wakeup_source_add(ws); | 201 | wakeup_source_add(ws); |
| 205 | } | 202 | } |
| 206 | 203 | ||
| 207 | static inline void wakeup_source_trash(struct wakeup_source *ws) | ||
| 208 | { | ||
| 209 | wakeup_source_remove(ws); | ||
| 210 | wakeup_source_drop(ws); | ||
| 211 | } | ||
| 212 | |||
| 213 | static inline void __pm_wakeup_event(struct wakeup_source *ws, unsigned int msec) | 204 | static inline void __pm_wakeup_event(struct wakeup_source *ws, unsigned int msec) |
| 214 | { | 205 | { |
| 215 | return pm_wakeup_ws_event(ws, msec, false); | 206 | return pm_wakeup_ws_event(ws, msec, false); |
