summaryrefslogtreecommitdiff
path: root/include/linux/device.h
diff options
context:
space:
mode:
authorRafael J. Wysocki <rjw@sisk.pl>2010-12-15 23:51:21 (GMT)
committerRafael J. Wysocki <rjw@sisk.pl>2010-12-24 14:02:44 (GMT)
commitb8c76f6aed0ab7df73a6410f3f82de2c831bb144 (patch)
tree1194ded4c23f62ab253a2e0712cfdd436aa2365b /include/linux/device.h
parent5b219a51fdceaf76e0e18da57c7efb9e5586e567 (diff)
downloadlinux-fsl-qoriq-b8c76f6aed0ab7df73a6410f3f82de2c831bb144.tar.xz
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 dd48953..45bc8c1 100644
--- a/include/linux/device.h
+++ b/include/linux/device.h
@@ -508,13 +508,13 @@ static inline int device_is_registered(struct device *dev)
static inline void device_enable_async_suspend(struct device *dev)
{
- if (dev->power.status == DPM_ON)
+ if (!dev->power.in_suspend)
dev->power.async_suspend = true;
}
static inline void device_disable_async_suspend(struct device *dev)
{
- if (dev->power.status == DPM_ON)
+ if (!dev->power.in_suspend)
dev->power.async_suspend = false;
}