Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 275626
b: refs/heads/master
c: 8b258cc
h: refs/heads/master
v: v3
  • Loading branch information
Rafael J. Wysocki committed Nov 17, 2011
1 parent 0de107b commit aff702e
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 9 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: af8db1508f2c9f3b6e633e2d2d906c6557c617f9
refs/heads/master: 8b258cc8ac229aa7d5dcb7cc34cb35d9124498ac
3 changes: 2 additions & 1 deletion trunk/drivers/base/power/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -920,7 +920,8 @@ static int __device_suspend(struct device *dev, pm_message_t state, bool async)
End:
if (!error) {
dev->power.is_suspended = true;
if (dev->power.wakeup_path && dev->parent)
if (dev->power.wakeup_path
&& dev->parent && !dev->parent->power.ignore_children)
dev->parent->power.wakeup_path = true;
}

Expand Down
5 changes: 5 additions & 0 deletions trunk/include/linux/device.h
Original file line number Diff line number Diff line change
Expand Up @@ -682,6 +682,11 @@ static inline bool device_async_suspend_enabled(struct device *dev)
return !!dev->power.async_suspend;
}

static inline void pm_suspend_ignore_children(struct device *dev, bool enable)
{
dev->power.ignore_children = enable;
}

static inline void device_lock(struct device *dev)
{
mutex_lock(&dev->mutex);
Expand Down
2 changes: 1 addition & 1 deletion trunk/include/linux/pm.h
Original file line number Diff line number Diff line change
Expand Up @@ -447,6 +447,7 @@ struct dev_pm_info {
unsigned int async_suspend:1;
bool is_prepared:1; /* Owned by the PM core */
bool is_suspended:1; /* Ditto */
bool ignore_children:1;
spinlock_t lock;
#ifdef CONFIG_PM_SLEEP
struct list_head entry;
Expand All @@ -464,7 +465,6 @@ struct dev_pm_info {
atomic_t usage_count;
atomic_t child_count;
unsigned int disable_depth:3;
unsigned int ignore_children:1;
unsigned int idle_notification:1;
unsigned int request_pending:1;
unsigned int deferred_resume:1;
Expand Down
6 changes: 0 additions & 6 deletions trunk/include/linux/pm_runtime.h
Original file line number Diff line number Diff line change
Expand Up @@ -52,11 +52,6 @@ static inline bool pm_children_suspended(struct device *dev)
|| !atomic_read(&dev->power.child_count);
}

static inline void pm_suspend_ignore_children(struct device *dev, bool enable)
{
dev->power.ignore_children = enable;
}

static inline void pm_runtime_get_noresume(struct device *dev)
{
atomic_inc(&dev->power.usage_count);
Expand Down Expand Up @@ -130,7 +125,6 @@ static inline void pm_runtime_allow(struct device *dev) {}
static inline void pm_runtime_forbid(struct device *dev) {}

static inline bool pm_children_suspended(struct device *dev) { return false; }
static inline void pm_suspend_ignore_children(struct device *dev, bool en) {}
static inline void pm_runtime_get_noresume(struct device *dev) {}
static inline void pm_runtime_put_noidle(struct device *dev) {}
static inline bool device_run_wake(struct device *dev) { return false; }
Expand Down

0 comments on commit aff702e

Please sign in to comment.