diff options
author | Rafael J. Wysocki <rjw@sisk.pl> | 2007-10-18 06:04:40 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-10-18 17:37:18 -0400 |
commit | 26398a70ea35f153feb799fa850c71685667712b (patch) | |
tree | e75959ef010bf3521bce2a33e59565c34b0c109d /include | |
parent | 95d9ffbe01fb21d524c86bf77871255066bc6e55 (diff) |
PM: Rename struct pm_ops and related things
The name of 'struct pm_ops' suggests that it is related to the power
management in general, but in fact it is only related to suspend. Moreover,
its name should indicate what this structure is used for, so it seems
reasonable to change it to 'struct platform_suspend_ops'. In that case, the
name of the global variable of this type used by the PM core and the names of
related functions should be changed accordingly.
Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
Acked-by: Pavel Machek <pavel@ucw.cz>
Cc: Len Brown <lenb@kernel.org>
Cc: Greg KH <greg@kroah.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'include')
-rw-r--r-- | include/linux/suspend.h | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/include/linux/suspend.h b/include/linux/suspend.h index c230680d5252..dce47825dbb8 100644 --- a/include/linux/suspend.h +++ b/include/linux/suspend.h | |||
@@ -27,16 +27,16 @@ typedef int __bitwise suspend_state_t; | |||
27 | #define PM_SUSPEND_MAX ((__force suspend_state_t) 4) | 27 | #define PM_SUSPEND_MAX ((__force suspend_state_t) 4) |
28 | 28 | ||
29 | /** | 29 | /** |
30 | * struct pm_ops - Callbacks for managing platform dependent system sleep | 30 | * struct platform_suspend_ops - Callbacks for managing platform dependent |
31 | * states. | 31 | * system sleep states. |
32 | * | 32 | * |
33 | * @valid: Callback to determine if given system sleep state is supported by | 33 | * @valid: Callback to determine if given system sleep state is supported by |
34 | * the platform. | 34 | * the platform. |
35 | * Valid (ie. supported) states are advertised in /sys/power/state. Note | 35 | * Valid (ie. supported) states are advertised in /sys/power/state. Note |
36 | * that it still may be impossible to enter given system sleep state if the | 36 | * that it still may be impossible to enter given system sleep state if the |
37 | * conditions aren't right. | 37 | * conditions aren't right. |
38 | * There is the %pm_valid_only_mem function available that can be assigned | 38 | * There is the %suspend_valid_only_mem function available that can be |
39 | * to this if the platform only supports mem sleep. | 39 | * assigned to this if the platform only supports mem sleep. |
40 | * | 40 | * |
41 | * @set_target: Tell the platform which system sleep state is going to be | 41 | * @set_target: Tell the platform which system sleep state is going to be |
42 | * entered. | 42 | * entered. |
@@ -73,7 +73,7 @@ typedef int __bitwise suspend_state_t; | |||
73 | * that implement @prepare(). If implemented, it is always called after | 73 | * that implement @prepare(). If implemented, it is always called after |
74 | * @enter() (even if @enter() fails). | 74 | * @enter() (even if @enter() fails). |
75 | */ | 75 | */ |
76 | struct pm_ops { | 76 | struct platform_suspend_ops { |
77 | int (*valid)(suspend_state_t state); | 77 | int (*valid)(suspend_state_t state); |
78 | int (*set_target)(suspend_state_t state); | 78 | int (*set_target)(suspend_state_t state); |
79 | int (*prepare)(suspend_state_t state); | 79 | int (*prepare)(suspend_state_t state); |
@@ -82,14 +82,14 @@ struct pm_ops { | |||
82 | }; | 82 | }; |
83 | 83 | ||
84 | #ifdef CONFIG_SUSPEND | 84 | #ifdef CONFIG_SUSPEND |
85 | extern struct pm_ops *pm_ops; | 85 | extern struct platform_suspend_ops *suspend_ops; |
86 | 86 | ||
87 | /** | 87 | /** |
88 | * pm_set_ops - set platform dependent power management ops | 88 | * suspend_set_ops - set platform dependent suspend operations |
89 | * @pm_ops: The new power management operations to set. | 89 | * @ops: The new suspend operations to set. |
90 | */ | 90 | */ |
91 | extern void pm_set_ops(struct pm_ops *pm_ops); | 91 | extern void suspend_set_ops(struct platform_suspend_ops *ops); |
92 | extern int pm_valid_only_mem(suspend_state_t state); | 92 | extern int suspend_valid_only_mem(suspend_state_t state); |
93 | 93 | ||
94 | /** | 94 | /** |
95 | * arch_suspend_disable_irqs - disable IRQs for suspend | 95 | * arch_suspend_disable_irqs - disable IRQs for suspend |
@@ -113,7 +113,7 @@ extern int pm_suspend(suspend_state_t state); | |||
113 | #else /* !CONFIG_SUSPEND */ | 113 | #else /* !CONFIG_SUSPEND */ |
114 | #define suspend_valid_only_mem NULL | 114 | #define suspend_valid_only_mem NULL |
115 | 115 | ||
116 | static inline void pm_set_ops(struct pm_ops *pm_ops) {} | 116 | static inline void suspend_set_ops(struct platform_suspend_ops *ops) {} |
117 | static inline int pm_suspend(suspend_state_t state) { return -ENOSYS; } | 117 | static inline int pm_suspend(suspend_state_t state) { return -ENOSYS; } |
118 | #endif /* !CONFIG_SUSPEND */ | 118 | #endif /* !CONFIG_SUSPEND */ |
119 | 119 | ||