Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 227588
b: refs/heads/master
c: 4b31db8
h: refs/heads/master
v: v3
  • Loading branch information
Rafael J. Wysocki committed Dec 24, 2010
1 parent bc9c2a5 commit 0469f12
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 2 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: 5c1a07ab3e78ef68fc9ccf419c969e8ed88d7cb6
refs/heads/master: 4b31db8a16fa0d4d6a0fa42d044e7a4f4dad3641
2 changes: 1 addition & 1 deletion trunk/drivers/base/power/generic_ops.c
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,7 @@ static int __pm_generic_resume(struct device *dev, int event)
return 0;

ret = callback(dev);
if (!ret) {
if (!ret && pm_runtime_enabled(dev)) {
pm_runtime_disable(dev);
pm_runtime_set_active(dev);
pm_runtime_enable(dev);
Expand Down
6 changes: 6 additions & 0 deletions trunk/include/linux/pm_runtime.h
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,11 @@ static inline bool pm_runtime_suspended(struct device *dev)
&& !dev->power.disable_depth;
}

static inline bool pm_runtime_enabled(struct device *dev)
{
return !dev->power.disable_depth;
}

static inline void pm_runtime_mark_last_busy(struct device *dev)
{
ACCESS_ONCE(dev->power.last_busy) = jiffies;
Expand Down Expand Up @@ -120,6 +125,7 @@ static inline void pm_runtime_put_noidle(struct device *dev) {}
static inline bool device_run_wake(struct device *dev) { return false; }
static inline void device_set_run_wake(struct device *dev, bool enable) {}
static inline bool pm_runtime_suspended(struct device *dev) { return false; }
static inline bool pm_runtime_enabled(struct device *dev) { return false; }

static inline int pm_generic_runtime_idle(struct device *dev) { return 0; }
static inline int pm_generic_runtime_suspend(struct device *dev) { return 0; }
Expand Down

0 comments on commit 0469f12

Please sign in to comment.