Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 267036
b: refs/heads/master
c: c3dc2f1
h: refs/heads/master
v: v3
  • Loading branch information
Ming Lei authored and Rafael J. Wysocki committed Sep 27, 2011
1 parent 79f0955 commit 8a8939d
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 5 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: 53b615ccca567ada1931eb04ad0614ac150c14a3
refs/heads/master: c3dc2f14622a06488f11452b6efd1e02c5a8548b
11 changes: 7 additions & 4 deletions trunk/drivers/base/power/runtime.c
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@

#include <linux/sched.h>
#include <linux/pm_runtime.h>
#include <trace/events/rpm.h>
#include "power.h"

static int rpm_resume(struct device *dev, int rpmflags);
Expand Down Expand Up @@ -196,6 +197,7 @@ static int rpm_idle(struct device *dev, int rpmflags)
int (*callback)(struct device *);
int retval;

trace_rpm_idle(dev, rpmflags);
retval = rpm_check_suspend_allowed(dev);
if (retval < 0)
; /* Conditions are wrong. */
Expand Down Expand Up @@ -257,6 +259,7 @@ static int rpm_idle(struct device *dev, int rpmflags)
wake_up_all(&dev->power.wait_queue);

out:
trace_rpm_return_int(dev, _THIS_IP_, retval);
return retval;
}

Expand Down Expand Up @@ -301,7 +304,7 @@ static int rpm_suspend(struct device *dev, int rpmflags)
struct device *parent = NULL;
int retval;

dev_dbg(dev, "%s flags 0x%x\n", __func__, rpmflags);
trace_rpm_suspend(dev, rpmflags);

repeat:
retval = rpm_check_suspend_allowed(dev);
Expand Down Expand Up @@ -445,7 +448,7 @@ static int rpm_suspend(struct device *dev, int rpmflags)
}

out:
dev_dbg(dev, "%s returns %d\n", __func__, retval);
trace_rpm_return_int(dev, _THIS_IP_, retval);

return retval;
}
Expand Down Expand Up @@ -474,7 +477,7 @@ static int rpm_resume(struct device *dev, int rpmflags)
struct device *parent = NULL;
int retval = 0;

dev_dbg(dev, "%s flags 0x%x\n", __func__, rpmflags);
trace_rpm_resume(dev, rpmflags);

repeat:
if (dev->power.runtime_error)
Expand Down Expand Up @@ -639,7 +642,7 @@ static int rpm_resume(struct device *dev, int rpmflags)
spin_lock_irq(&dev->power.lock);
}

dev_dbg(dev, "%s returns %d\n", __func__, retval);
trace_rpm_return_int(dev, _THIS_IP_, retval);

return retval;
}
Expand Down

0 comments on commit 8a8939d

Please sign in to comment.