aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/acpi
diff options
context:
space:
mode:
authorRafael J. Wysocki <rjw@sisk.pl>2007-10-18 06:04:41 -0400
committerLinus Torvalds <torvalds@woody.linux-foundation.org>2007-10-18 17:37:18 -0400
commite6c5eb9541f2197a3ffab90b1c7a3250a9b51bf6 (patch)
treeac227415da22d4345f8e72a6a8e781757b6ce85a /drivers/acpi
parent26398a70ea35f153feb799fa850c71685667712b (diff)
PM: Rework struct platform_suspend_ops
There is no reason why the .prepare() and .finish() methods in 'struct platform_suspend_ops' should take any arguments, since architectures don't use these methods' argument in any practically meaningful way (ie. either the target system sleep state is conveyed to the platform by .set_target(), or there is only one suspend state supported and it is indicated to the PM core by .valid(), or .prepare() and .finish() aren't defined at all).  There also is no reason why .finish() should return any result. 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 'drivers/acpi')
-rw-r--r--drivers/acpi/sleep/main.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/drivers/acpi/sleep/main.c b/drivers/acpi/sleep/main.c
index 3271850a1f35..c58dd0bb5506 100644
--- a/drivers/acpi/sleep/main.c
+++ b/drivers/acpi/sleep/main.c
@@ -85,13 +85,12 @@ static int acpi_pm_set_target(suspend_state_t pm_state)
85 85
86/** 86/**
87 * acpi_pm_prepare - Do preliminary suspend work. 87 * acpi_pm_prepare - Do preliminary suspend work.
88 * @pm_state: ignored
89 * 88 *
90 * If necessary, set the firmware waking vector and do arch-specific 89 * If necessary, set the firmware waking vector and do arch-specific
91 * nastiness to get the wakeup code to the waking vector. 90 * nastiness to get the wakeup code to the waking vector.
92 */ 91 */
93 92
94static int acpi_pm_prepare(suspend_state_t pm_state) 93static int acpi_pm_prepare(void)
95{ 94{
96 int error = acpi_sleep_prepare(acpi_target_sleep_state); 95 int error = acpi_sleep_prepare(acpi_target_sleep_state);
97 96
@@ -160,13 +159,12 @@ static int acpi_pm_enter(suspend_state_t pm_state)
160 159
161/** 160/**
162 * acpi_pm_finish - Finish up suspend sequence. 161 * acpi_pm_finish - Finish up suspend sequence.
163 * @pm_state: ignored
164 * 162 *
165 * This is called after we wake back up (or if entering the sleep state 163 * This is called after we wake back up (or if entering the sleep state
166 * failed). 164 * failed).
167 */ 165 */
168 166
169static int acpi_pm_finish(suspend_state_t pm_state) 167static void acpi_pm_finish(void)
170{ 168{
171 u32 acpi_state = acpi_target_sleep_state; 169 u32 acpi_state = acpi_target_sleep_state;
172 170
@@ -184,7 +182,6 @@ static int acpi_pm_finish(suspend_state_t pm_state)
184 init_8259A(0); 182 init_8259A(0);
185 } 183 }
186#endif 184#endif
187 return 0;
188} 185}
189 186
190static int acpi_pm_state_valid(suspend_state_t pm_state) 187static int acpi_pm_state_valid(suspend_state_t pm_state)