From aff702ed480e9543020156e828d55bb02ebc759a Mon Sep 17 00:00:00 2001 From: "Rafael J. Wysocki" Date: Thu, 17 Nov 2011 21:39:33 +0100 Subject: [PATCH] --- yaml --- r: 275626 b: refs/heads/master c: 8b258cc8ac229aa7d5dcb7cc34cb35d9124498ac h: refs/heads/master v: v3 --- [refs] | 2 +- trunk/drivers/base/power/main.c | 3 ++- trunk/include/linux/device.h | 5 +++++ trunk/include/linux/pm.h | 2 +- trunk/include/linux/pm_runtime.h | 6 ------ 5 files changed, 9 insertions(+), 9 deletions(-) diff --git a/[refs] b/[refs] index 996c129a5bb5..4f913be83303 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: af8db1508f2c9f3b6e633e2d2d906c6557c617f9 +refs/heads/master: 8b258cc8ac229aa7d5dcb7cc34cb35d9124498ac diff --git a/trunk/drivers/base/power/main.c b/trunk/drivers/base/power/main.c index 7fa098464dae..c3d2dfcf438d 100644 --- a/trunk/drivers/base/power/main.c +++ b/trunk/drivers/base/power/main.c @@ -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; } diff --git a/trunk/include/linux/device.h b/trunk/include/linux/device.h index ffbcf95cd97d..52b3a4111df9 100644 --- a/trunk/include/linux/device.h +++ b/trunk/include/linux/device.h @@ -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); diff --git a/trunk/include/linux/pm.h b/trunk/include/linux/pm.h index f15acb646813..5c4c8b18c8b7 100644 --- a/trunk/include/linux/pm.h +++ b/trunk/include/linux/pm.h @@ -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; @@ -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; diff --git a/trunk/include/linux/pm_runtime.h b/trunk/include/linux/pm_runtime.h index d8d903619642..d3085e72a0ee 100644 --- a/trunk/include/linux/pm_runtime.h +++ b/trunk/include/linux/pm_runtime.h @@ -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); @@ -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; }