diff options
| author | Ingo Molnar <mingo@elte.hu> | 2010-03-04 11:51:29 +0100 |
|---|---|---|
| committer | Ingo Molnar <mingo@elte.hu> | 2010-03-04 11:51:29 +0100 |
| commit | e02c4fd3142dfb9412531bbfabd510a2a7c6ea46 (patch) | |
| tree | 61b64506b2c016e050f940a89d1ffd36b7c00fdf /include/linux/device.h | |
| parent | ae1f30384baef4056438d81b305a6a5199b0d16c (diff) | |
| parent | ac91d85456372a90af5b85eb6620fd2efb1e431b (diff) | |
Merge branch 'tip/tracing/urgent' of git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-2.6-trace into tracing/urgent
Diffstat (limited to 'include/linux/device.h')
| -rw-r--r-- | include/linux/device.h | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/include/linux/device.h b/include/linux/device.h index a62799f2ab00..b30527db3ac0 100644 --- a/include/linux/device.h +++ b/include/linux/device.h @@ -472,6 +472,23 @@ static inline int device_is_registered(struct device *dev) return dev->kobj.state_in_sysfs; } +static inline void device_enable_async_suspend(struct device *dev) +{ + if (dev->power.status == DPM_ON) + dev->power.async_suspend = true; +} + +static inline void device_disable_async_suspend(struct device *dev) +{ + if (dev->power.status == DPM_ON) + dev->power.async_suspend = false; +} + +static inline bool device_async_suspend_enabled(struct device *dev) +{ + return !!dev->power.async_suspend; +} + void driver_init(void); /* |
