Skip to content

Commit

Permalink
Enable minimal per-device resume tracing
Browse files Browse the repository at this point in the history
This is the minimal resume trace code to find which device resume (if
any) results in problems.  Usually, you'd use the information this
generates as a starting point to adding more fine-grained trace event
points.

Signed-off-by: Linus Torvalds <torvalds@osdl.org>
  • Loading branch information
Linus Torvalds committed Jun 24, 2006
1 parent eb71c87 commit d02f40e
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions drivers/base/power/resume.c
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
*/

#include <linux/device.h>
#include <linux/resume-trace.h>
#include "../base.h"
#include "power.h"

Expand All @@ -23,6 +24,8 @@ int resume_device(struct device * dev)
{
int error = 0;

TRACE_DEVICE(dev);
TRACE_RESUME(0);
down(&dev->sem);
if (dev->power.pm_parent
&& dev->power.pm_parent->power.power_state.event) {
Expand All @@ -36,6 +39,7 @@ int resume_device(struct device * dev)
error = dev->bus->resume(dev);
}
up(&dev->sem);
TRACE_RESUME(error);
return error;
}

Expand Down

0 comments on commit d02f40e

Please sign in to comment.