Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 291859
b: refs/heads/master
c: d94aff8
h: refs/heads/master
i:
  291857: 6b3ad83
  291855: bdd7a01
v: v3
  • Loading branch information
Rafael J. Wysocki committed Mar 4, 2012
1 parent c8429ed commit 15345c3
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 11 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 69f1d475cc80c55121852b3030873cdd407fd31c
refs/heads/master: d94aff87826ee6aa43032f4c0263482913f4e2c8
15 changes: 5 additions & 10 deletions trunk/drivers/base/power/wakeup.c
Original file line number Diff line number Diff line change
Expand Up @@ -74,22 +74,17 @@ EXPORT_SYMBOL_GPL(wakeup_source_create);
/**
* wakeup_source_destroy - Destroy a struct wakeup_source object.
* @ws: Wakeup source to destroy.
*
* 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_destroy(struct wakeup_source *ws)
{
if (!ws)
return;

spin_lock_irq(&ws->lock);
while (ws->active) {
spin_unlock_irq(&ws->lock);

schedule_timeout_interruptible(msecs_to_jiffies(TIMEOUT));

spin_lock_irq(&ws->lock);
}
spin_unlock_irq(&ws->lock);

del_timer_sync(&ws->timer);
__pm_relax(ws);
kfree(ws->name);
kfree(ws);
}
Expand Down

0 comments on commit 15345c3

Please sign in to comment.