mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-09-30 14:19:16 +00:00
PM / wakeup: Drop wakeup_source_drop()
After commit d856f39ac1cc ("PM / wakeup: Rework wakeup source timer cancellation") wakeup_source_drop() is a trivial wrapper around __pm_relax() and it has no users except for wakeup_source_destroy() and wakeup_source_trash() which also has no users, so drop it along with the latter and make wakeup_source_destroy() call __pm_relax() directly. Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com> Acked-by: Viresh Kumar <viresh.kumar@linaro.org>
This commit is contained in:
parent
1fad17fb1b
commit
623217a0cc
2 changed files with 1 additions and 26 deletions
|
@ -106,22 +106,6 @@ struct wakeup_source *wakeup_source_create(const char *name)
|
||||||
}
|
}
|
||||||
EXPORT_SYMBOL_GPL(wakeup_source_create);
|
EXPORT_SYMBOL_GPL(wakeup_source_create);
|
||||||
|
|
||||||
/**
|
|
||||||
* wakeup_source_drop - Prepare a struct wakeup_source object for destruction.
|
|
||||||
* @ws: Wakeup source to prepare for destruction.
|
|
||||||
*
|
|
||||||
* Callers must ensure that __pm_stay_awake() or __pm_wakeup_event() will never
|
|
||||||
* be run in parallel with this function for the same wakeup source object.
|
|
||||||
*/
|
|
||||||
void wakeup_source_drop(struct wakeup_source *ws)
|
|
||||||
{
|
|
||||||
if (!ws)
|
|
||||||
return;
|
|
||||||
|
|
||||||
__pm_relax(ws);
|
|
||||||
}
|
|
||||||
EXPORT_SYMBOL_GPL(wakeup_source_drop);
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Record wakeup_source statistics being deleted into a dummy wakeup_source.
|
* Record wakeup_source statistics being deleted into a dummy wakeup_source.
|
||||||
*/
|
*/
|
||||||
|
@ -161,7 +145,7 @@ void wakeup_source_destroy(struct wakeup_source *ws)
|
||||||
if (!ws)
|
if (!ws)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
wakeup_source_drop(ws);
|
__pm_relax(ws);
|
||||||
wakeup_source_record(ws);
|
wakeup_source_record(ws);
|
||||||
kfree_const(ws->name);
|
kfree_const(ws->name);
|
||||||
kfree(ws);
|
kfree(ws);
|
||||||
|
|
|
@ -96,7 +96,6 @@ static inline void device_set_wakeup_path(struct device *dev)
|
||||||
/* drivers/base/power/wakeup.c */
|
/* drivers/base/power/wakeup.c */
|
||||||
extern void wakeup_source_prepare(struct wakeup_source *ws, const char *name);
|
extern void wakeup_source_prepare(struct wakeup_source *ws, const char *name);
|
||||||
extern struct wakeup_source *wakeup_source_create(const char *name);
|
extern struct wakeup_source *wakeup_source_create(const char *name);
|
||||||
extern void wakeup_source_drop(struct wakeup_source *ws);
|
|
||||||
extern void wakeup_source_destroy(struct wakeup_source *ws);
|
extern void wakeup_source_destroy(struct wakeup_source *ws);
|
||||||
extern void wakeup_source_add(struct wakeup_source *ws);
|
extern void wakeup_source_add(struct wakeup_source *ws);
|
||||||
extern void wakeup_source_remove(struct wakeup_source *ws);
|
extern void wakeup_source_remove(struct wakeup_source *ws);
|
||||||
|
@ -134,8 +133,6 @@ static inline struct wakeup_source *wakeup_source_create(const char *name)
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
static inline void wakeup_source_drop(struct wakeup_source *ws) {}
|
|
||||||
|
|
||||||
static inline void wakeup_source_destroy(struct wakeup_source *ws) {}
|
static inline void wakeup_source_destroy(struct wakeup_source *ws) {}
|
||||||
|
|
||||||
static inline void wakeup_source_add(struct wakeup_source *ws) {}
|
static inline void wakeup_source_add(struct wakeup_source *ws) {}
|
||||||
|
@ -204,12 +201,6 @@ static inline void wakeup_source_init(struct wakeup_source *ws,
|
||||||
wakeup_source_add(ws);
|
wakeup_source_add(ws);
|
||||||
}
|
}
|
||||||
|
|
||||||
static inline void wakeup_source_trash(struct wakeup_source *ws)
|
|
||||||
{
|
|
||||||
wakeup_source_remove(ws);
|
|
||||||
wakeup_source_drop(ws);
|
|
||||||
}
|
|
||||||
|
|
||||||
static inline void __pm_wakeup_event(struct wakeup_source *ws, unsigned int msec)
|
static inline void __pm_wakeup_event(struct wakeup_source *ws, unsigned int msec)
|
||||||
{
|
{
|
||||||
return pm_wakeup_ws_event(ws, msec, false);
|
return pm_wakeup_ws_event(ws, msec, false);
|
||||||
|
|
Loading…
Reference in a new issue