diff options
author | Len Brown <len.brown@intel.com> | 2007-02-16 22:11:57 -0500 |
---|---|---|
committer | Len Brown <len.brown@intel.com> | 2007-02-16 22:11:57 -0500 |
commit | 902b236c087bf021c94cc21a2b09d928c4156c2b (patch) | |
tree | c62e6a6d8dedcff68e90e3cd153789f87cc67fb6 /drivers/acpi | |
parent | 08e4a10ec82faf5ba67c8d0115b7bc9e58071555 (diff) | |
parent | aafbcd165a2a02e6dff173f66772b3148229ace8 (diff) |
Pull bugzilla-7887 into release branch
Diffstat (limited to 'drivers/acpi')
-rw-r--r-- | drivers/acpi/bus.c | 13 | ||||
-rw-r--r-- | drivers/acpi/hardware/hwsleep.c | 13 | ||||
-rw-r--r-- | drivers/acpi/sleep/main.c | 3 |
3 files changed, 17 insertions, 12 deletions
diff --git a/drivers/acpi/bus.c b/drivers/acpi/bus.c index 0c93cd400ddb..dd49ea0d0ed3 100644 --- a/drivers/acpi/bus.c +++ b/drivers/acpi/bus.c | |||
@@ -147,7 +147,7 @@ int acpi_bus_get_power(acpi_handle handle, int *state) | |||
147 | *state = ACPI_STATE_D0; | 147 | *state = ACPI_STATE_D0; |
148 | } else { | 148 | } else { |
149 | /* | 149 | /* |
150 | * Get the device's power state either directly (via _PSC) or | 150 | * Get the device's power state either directly (via _PSC) or |
151 | * indirectly (via power resources). | 151 | * indirectly (via power resources). |
152 | */ | 152 | */ |
153 | if (device->power.flags.explicit_get) { | 153 | if (device->power.flags.explicit_get) { |
@@ -461,7 +461,7 @@ static void acpi_bus_notify(acpi_handle handle, u32 type, void *data) | |||
461 | "Received BUS CHECK notification for device [%s]\n", | 461 | "Received BUS CHECK notification for device [%s]\n", |
462 | device->pnp.bus_id)); | 462 | device->pnp.bus_id)); |
463 | result = acpi_bus_check_scope(device); | 463 | result = acpi_bus_check_scope(device); |
464 | /* | 464 | /* |
465 | * TBD: We'll need to outsource certain events to non-ACPI | 465 | * TBD: We'll need to outsource certain events to non-ACPI |
466 | * drivers via the device manager (device.c). | 466 | * drivers via the device manager (device.c). |
467 | */ | 467 | */ |
@@ -472,7 +472,7 @@ static void acpi_bus_notify(acpi_handle handle, u32 type, void *data) | |||
472 | "Received DEVICE CHECK notification for device [%s]\n", | 472 | "Received DEVICE CHECK notification for device [%s]\n", |
473 | device->pnp.bus_id)); | 473 | device->pnp.bus_id)); |
474 | result = acpi_bus_check_device(device, NULL); | 474 | result = acpi_bus_check_device(device, NULL); |
475 | /* | 475 | /* |
476 | * TBD: We'll need to outsource certain events to non-ACPI | 476 | * TBD: We'll need to outsource certain events to non-ACPI |
477 | * drivers via the device manager (device.c). | 477 | * drivers via the device manager (device.c). |
478 | */ | 478 | */ |
@@ -542,7 +542,7 @@ static int __init acpi_bus_init_irq(void) | |||
542 | char *message = NULL; | 542 | char *message = NULL; |
543 | 543 | ||
544 | 544 | ||
545 | /* | 545 | /* |
546 | * Let the system know what interrupt model we are using by | 546 | * Let the system know what interrupt model we are using by |
547 | * evaluating the \_PIC object, if exists. | 547 | * evaluating the \_PIC object, if exists. |
548 | */ | 548 | */ |
@@ -683,7 +683,7 @@ static int __init acpi_bus_init(void) | |||
683 | * the EC device is found in the namespace (i.e. before acpi_initialize_objects() | 683 | * the EC device is found in the namespace (i.e. before acpi_initialize_objects() |
684 | * is called). | 684 | * is called). |
685 | * | 685 | * |
686 | * This is accomplished by looking for the ECDT table, and getting | 686 | * This is accomplished by looking for the ECDT table, and getting |
687 | * the EC parameters out of that. | 687 | * the EC parameters out of that. |
688 | */ | 688 | */ |
689 | status = acpi_ec_ecdt_probe(); | 689 | status = acpi_ec_ecdt_probe(); |
@@ -698,6 +698,9 @@ static int __init acpi_bus_init(void) | |||
698 | 698 | ||
699 | printk(KERN_INFO PREFIX "Interpreter enabled\n"); | 699 | printk(KERN_INFO PREFIX "Interpreter enabled\n"); |
700 | 700 | ||
701 | /* Initialize sleep structures */ | ||
702 | acpi_sleep_init(); | ||
703 | |||
701 | /* | 704 | /* |
702 | * Get the system interrupt model and evaluate \_PIC. | 705 | * Get the system interrupt model and evaluate \_PIC. |
703 | */ | 706 | */ |
diff --git a/drivers/acpi/hardware/hwsleep.c b/drivers/acpi/hardware/hwsleep.c index 57901ca3ade9..8fa93125fd4c 100644 --- a/drivers/acpi/hardware/hwsleep.c +++ b/drivers/acpi/hardware/hwsleep.c | |||
@@ -235,6 +235,14 @@ acpi_status acpi_enter_sleep_state_prep(u8 sleep_state) | |||
235 | "While executing method _SST")); | 235 | "While executing method _SST")); |
236 | } | 236 | } |
237 | 237 | ||
238 | /* | ||
239 | * 1) Disable/Clear all GPEs | ||
240 | */ | ||
241 | status = acpi_hw_disable_all_gpes(); | ||
242 | if (ACPI_FAILURE(status)) { | ||
243 | return_ACPI_STATUS(status); | ||
244 | } | ||
245 | |||
238 | return_ACPI_STATUS(AE_OK); | 246 | return_ACPI_STATUS(AE_OK); |
239 | } | 247 | } |
240 | 248 | ||
@@ -290,13 +298,8 @@ acpi_status asmlinkage acpi_enter_sleep_state(u8 sleep_state) | |||
290 | } | 298 | } |
291 | 299 | ||
292 | /* | 300 | /* |
293 | * 1) Disable/Clear all GPEs | ||
294 | * 2) Enable all wakeup GPEs | 301 | * 2) Enable all wakeup GPEs |
295 | */ | 302 | */ |
296 | status = acpi_hw_disable_all_gpes(); | ||
297 | if (ACPI_FAILURE(status)) { | ||
298 | return_ACPI_STATUS(status); | ||
299 | } | ||
300 | acpi_gbl_system_awake_and_running = FALSE; | 303 | acpi_gbl_system_awake_and_running = FALSE; |
301 | 304 | ||
302 | status = acpi_hw_enable_all_wakeup_gpes(); | 305 | status = acpi_hw_enable_all_wakeup_gpes(); |
diff --git a/drivers/acpi/sleep/main.c b/drivers/acpi/sleep/main.c index 62ce87d71651..37a0930fc0a6 100644 --- a/drivers/acpi/sleep/main.c +++ b/drivers/acpi/sleep/main.c | |||
@@ -200,7 +200,7 @@ static struct dmi_system_id __initdata acpisleep_dmi_table[] = { | |||
200 | {}, | 200 | {}, |
201 | }; | 201 | }; |
202 | 202 | ||
203 | static int __init acpi_sleep_init(void) | 203 | int __init acpi_sleep_init(void) |
204 | { | 204 | { |
205 | int i = 0; | 205 | int i = 0; |
206 | 206 | ||
@@ -229,4 +229,3 @@ static int __init acpi_sleep_init(void) | |||
229 | return 0; | 229 | return 0; |
230 | } | 230 | } |
231 | 231 | ||
232 | late_initcall(acpi_sleep_init); | ||