summaryrefslogtreecommitdiff
path: root/include/linux
diff options
context:
space:
mode:
Diffstat (limited to 'include/linux')
-rw-r--r--include/linux/device.h7
-rw-r--r--include/linux/pm.h6
2 files changed, 8 insertions, 5 deletions
diff --git a/include/linux/device.h b/include/linux/device.h
index 52a5f15a2223..86529e642d6c 100644
--- a/include/linux/device.h
+++ b/include/linux/device.h
@@ -772,6 +772,13 @@ static inline void pm_suspend_ignore_children(struct device *dev, bool enable)
dev->power.ignore_children = enable;
}
+static inline void dev_pm_syscore_device(struct device *dev, bool val)
+{
+#ifdef CONFIG_PM_SLEEP
+ dev->power.syscore = val;
+#endif
+}
+
static inline void device_lock(struct device *dev)
{
mutex_lock(&dev->mutex);
diff --git a/include/linux/pm.h b/include/linux/pm.h
index b79a0dd3bc6d..44d1f2307dbc 100644
--- a/include/linux/pm.h
+++ b/include/linux/pm.h
@@ -43,12 +43,8 @@ struct device;
#ifdef CONFIG_PM
extern const char power_group_name[]; /* = "power" */
-
-extern void dev_pm_syscore_device(struct device *dev, bool val);
#else
#define power_group_name NULL
-
-static inline void dev_pm_syscore_device(struct device *dev, bool val) {}
#endif
typedef struct pm_message {
@@ -515,13 +511,13 @@ struct dev_pm_info {
bool is_suspended:1; /* Ditto */
bool ignore_children:1;
bool early_init:1; /* Owned by the PM core */
- bool syscore:1;
spinlock_t lock;
#ifdef CONFIG_PM_SLEEP
struct list_head entry;
struct completion completion;
struct wakeup_source *wakeup;
bool wakeup_path:1;
+ bool syscore:1;
#else
unsigned int should_wakeup:1;
#endif