aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2011-06-23 00:08:52 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2011-06-23 00:08:52 -0400
commit68d0080f1e222757c85606d3eaf81b5c4aa7719f (patch)
tree5f177f7571a56e7dfe3888f67fcc86532be8235c /include/linux
parentf957db4fcdd8f03e186aa8f041f4049e76ab741c (diff)
parenta5f76d5eba157bf637beb2dd18026db2917c512e (diff)
Merge branch 'pm-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/suspend-2.6
* 'pm-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/suspend-2.6: PCI / PM: Block races between runtime PM and system sleep PM / Domains: Update documentation PM / Runtime: Handle clocks correctly if CONFIG_PM_RUNTIME is unset PM: Fix async resume following suspend failure PM: Free memory bitmaps if opening /dev/snapshot fails PM: Rename dev_pm_info.in_suspend to is_prepared PM: Update documentation regarding sysdevs PM / Runtime: Update doc: usage count no longer incremented across system PM
Diffstat (limited to 'include/linux')
-rw-r--r--include/linux/device.h4
-rw-r--r--include/linux/pm.h3
2 files changed, 4 insertions, 3 deletions
diff --git a/include/linux/device.h b/include/linux/device.h
index c66111affca9..553fd37b173b 100644
--- a/include/linux/device.h
+++ b/include/linux/device.h
@@ -654,13 +654,13 @@ static inline int device_is_registered(struct device *dev)
654 654
655static inline void device_enable_async_suspend(struct device *dev) 655static inline void device_enable_async_suspend(struct device *dev)
656{ 656{
657 if (!dev->power.in_suspend) 657 if (!dev->power.is_prepared)
658 dev->power.async_suspend = true; 658 dev->power.async_suspend = true;
659} 659}
660 660
661static inline void device_disable_async_suspend(struct device *dev) 661static inline void device_disable_async_suspend(struct device *dev)
662{ 662{
663 if (!dev->power.in_suspend) 663 if (!dev->power.is_prepared)
664 dev->power.async_suspend = false; 664 dev->power.async_suspend = false;
665} 665}
666 666
diff --git a/include/linux/pm.h b/include/linux/pm.h
index 3160648ccdda..411e4f4be52b 100644
--- a/include/linux/pm.h
+++ b/include/linux/pm.h
@@ -425,7 +425,8 @@ struct dev_pm_info {
425 pm_message_t power_state; 425 pm_message_t power_state;
426 unsigned int can_wakeup:1; 426 unsigned int can_wakeup:1;
427 unsigned int async_suspend:1; 427 unsigned int async_suspend:1;
428 unsigned int in_suspend:1; /* Owned by the PM core */ 428 bool is_prepared:1; /* Owned by the PM core */
429 bool is_suspended:1; /* Ditto */
429 spinlock_t lock; 430 spinlock_t lock;
430#ifdef CONFIG_PM_SLEEP 431#ifdef CONFIG_PM_SLEEP
431 struct list_head entry; 432 struct list_head entry;