diff options
Diffstat (limited to 'include/linux/pm.h')
-rw-r--r-- | include/linux/pm.h | 16 |
1 files changed, 4 insertions, 12 deletions
diff --git a/include/linux/pm.h b/include/linux/pm.h index 52e8c55ff314..a84118911ced 100644 --- a/include/linux/pm.h +++ b/include/linux/pm.h | |||
@@ -448,23 +448,24 @@ enum rpm_request { | |||
448 | RPM_REQ_RESUME, | 448 | RPM_REQ_RESUME, |
449 | }; | 449 | }; |
450 | 450 | ||
451 | struct wakeup_source; | ||
452 | |||
451 | struct dev_pm_info { | 453 | struct dev_pm_info { |
452 | pm_message_t power_state; | 454 | pm_message_t power_state; |
453 | unsigned int can_wakeup:1; | 455 | unsigned int can_wakeup:1; |
454 | unsigned int should_wakeup:1; | ||
455 | unsigned async_suspend:1; | 456 | unsigned async_suspend:1; |
456 | enum dpm_state status; /* Owned by the PM core */ | 457 | enum dpm_state status; /* Owned by the PM core */ |
458 | spinlock_t lock; | ||
457 | #ifdef CONFIG_PM_SLEEP | 459 | #ifdef CONFIG_PM_SLEEP |
458 | struct list_head entry; | 460 | struct list_head entry; |
459 | struct completion completion; | 461 | struct completion completion; |
460 | unsigned long wakeup_count; | 462 | struct wakeup_source *wakeup; |
461 | #endif | 463 | #endif |
462 | #ifdef CONFIG_PM_RUNTIME | 464 | #ifdef CONFIG_PM_RUNTIME |
463 | struct timer_list suspend_timer; | 465 | struct timer_list suspend_timer; |
464 | unsigned long timer_expires; | 466 | unsigned long timer_expires; |
465 | struct work_struct work; | 467 | struct work_struct work; |
466 | wait_queue_head_t wait_queue; | 468 | wait_queue_head_t wait_queue; |
467 | spinlock_t lock; | ||
468 | atomic_t usage_count; | 469 | atomic_t usage_count; |
469 | atomic_t child_count; | 470 | atomic_t child_count; |
470 | unsigned int disable_depth:3; | 471 | unsigned int disable_depth:3; |
@@ -559,11 +560,6 @@ extern void __suspend_report_result(const char *function, void *fn, int ret); | |||
559 | } while (0) | 560 | } while (0) |
560 | 561 | ||
561 | extern void device_pm_wait_for_dev(struct device *sub, struct device *dev); | 562 | extern void device_pm_wait_for_dev(struct device *sub, struct device *dev); |
562 | |||
563 | /* drivers/base/power/wakeup.c */ | ||
564 | extern void pm_wakeup_event(struct device *dev, unsigned int msec); | ||
565 | extern void pm_stay_awake(struct device *dev); | ||
566 | extern void pm_relax(void); | ||
567 | #else /* !CONFIG_PM_SLEEP */ | 563 | #else /* !CONFIG_PM_SLEEP */ |
568 | 564 | ||
569 | #define device_pm_lock() do {} while (0) | 565 | #define device_pm_lock() do {} while (0) |
@@ -577,10 +573,6 @@ static inline int dpm_suspend_start(pm_message_t state) | |||
577 | #define suspend_report_result(fn, ret) do {} while (0) | 573 | #define suspend_report_result(fn, ret) do {} while (0) |
578 | 574 | ||
579 | static inline void device_pm_wait_for_dev(struct device *a, struct device *b) {} | 575 | static inline void device_pm_wait_for_dev(struct device *a, struct device *b) {} |
580 | |||
581 | static inline void pm_wakeup_event(struct device *dev, unsigned int msec) {} | ||
582 | static inline void pm_stay_awake(struct device *dev) {} | ||
583 | static inline void pm_relax(void) {} | ||
584 | #endif /* !CONFIG_PM_SLEEP */ | 576 | #endif /* !CONFIG_PM_SLEEP */ |
585 | 577 | ||
586 | /* How to reorder dpm_list after device_move() */ | 578 | /* How to reorder dpm_list after device_move() */ |