aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/device.h
diff options
context:
space:
mode:
authorRafael J. Wysocki <rjw@sisk.pl>2010-12-15 18:51:21 -0500
committerRafael J. Wysocki <rjw@sisk.pl>2010-12-24 09:02:44 -0500
commitb8c76f6aed0ab7df73a6410f3f82de2c831bb144 (patch)
tree1194ded4c23f62ab253a2e0712cfdd436aa2365b /include/linux/device.h
parent5b219a51fdceaf76e0e18da57c7efb9e5586e567 (diff)
PM: Replace the device power.status field with a bit field
The device power.status field is too complicated for its purpose (storing the information about whether or not the device is in the "active" state from the PM core's point of view), so replace it with a bit field and modify all of its users accordingly. Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
Diffstat (limited to 'include/linux/device.h')
-rw-r--r--include/linux/device.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/include/linux/device.h b/include/linux/device.h
index dd4895313468..45bc8c1669d2 100644
--- a/include/linux/device.h
+++ b/include/linux/device.h
@@ -508,13 +508,13 @@ static inline int device_is_registered(struct device *dev)
508 508
509static inline void device_enable_async_suspend(struct device *dev) 509static inline void device_enable_async_suspend(struct device *dev)
510{ 510{
511 if (dev->power.status == DPM_ON) 511 if (!dev->power.in_suspend)
512 dev->power.async_suspend = true; 512 dev->power.async_suspend = true;
513} 513}
514 514
515static inline void device_disable_async_suspend(struct device *dev) 515static inline void device_disable_async_suspend(struct device *dev)
516{ 516{
517 if (dev->power.status == DPM_ON) 517 if (!dev->power.in_suspend)
518 dev->power.async_suspend = false; 518 dev->power.async_suspend = false;
519} 519}
520 520