提交 d02f40e8 编写于 作者: L Linus Torvalds

Enable minimal per-device resume tracing

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: NLinus Torvalds <torvalds@osdl.org>
上级 eb71c87a
......@@ -9,6 +9,7 @@
*/
#include <linux/device.h>
#include <linux/resume-trace.h>
#include "../base.h"
#include "power.h"
......@@ -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) {
......@@ -36,6 +39,7 @@ int resume_device(struct device * dev)
error = dev->bus->resume(dev);
}
up(&dev->sem);
TRACE_RESUME(error);
return error;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册