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>
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user