diff options
Diffstat (limited to 'drivers/base/power/power.h')
-rw-r--r-- | drivers/base/power/power.h | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/drivers/base/power/power.h b/drivers/base/power/power.h index a84332aefc2d..a46e97e515c5 100644 --- a/drivers/base/power/power.h +++ b/drivers/base/power/power.h @@ -144,6 +144,11 @@ extern void device_pm_move_after(struct device *, struct device *); extern void device_pm_move_last(struct device *); extern void device_pm_check_callbacks(struct device *dev); +static inline bool device_pm_initialized(struct device *dev) +{ + return dev->power.in_dpm_list; +} + #else /* !CONFIG_PM_SLEEP */ static inline void device_pm_sleep_init(struct device *dev) {} @@ -163,6 +168,11 @@ static inline void device_pm_move_last(struct device *dev) {} static inline void device_pm_check_callbacks(struct device *dev) {} +static inline bool device_pm_initialized(struct device *dev) +{ + return device_is_registered(dev); +} + #endif /* !CONFIG_PM_SLEEP */ static inline void device_pm_init(struct device *dev) |