Commit 9900141b authored by Len Brown's avatar Len Brown

IBM ThinkPAD T30/T40 oops (David Shaohua Li)

https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=98849
parent f961b5f3
...@@ -32,7 +32,7 @@ ...@@ -32,7 +32,7 @@
#include <asm/io.h> #include <asm/io.h>
#include <acpi/acpi_bus.h> #include <acpi/acpi_bus.h>
#include <acpi/acpi_drivers.h> #include <acpi/acpi_drivers.h>
#include <acpi/actypes.h>
#define _COMPONENT ACPI_EC_COMPONENT #define _COMPONENT ACPI_EC_COMPONENT
ACPI_MODULE_NAME ("acpi_ec") ACPI_MODULE_NAME ("acpi_ec")
...@@ -412,6 +412,9 @@ acpi_ec_space_setup ( ...@@ -412,6 +412,9 @@ acpi_ec_space_setup (
* The EC object is in the handler context and is needed * The EC object is in the handler context and is needed
* when calling the acpi_ec_space_handler. * when calling the acpi_ec_space_handler.
*/ */
if(function == ACPI_REGION_DEACTIVATE)
*return_context = NULL;
else
*return_context = handler_context; *return_context = handler_context;
return AE_OK; return AE_OK;
......
...@@ -382,7 +382,7 @@ acpi_ev_detach_region( ...@@ -382,7 +382,7 @@ acpi_ev_detach_region(
union acpi_operand_object *obj_desc; union acpi_operand_object *obj_desc;
union acpi_operand_object **last_obj_ptr; union acpi_operand_object **last_obj_ptr;
acpi_adr_space_setup region_setup; acpi_adr_space_setup region_setup;
void *region_context; void **region_context;
union acpi_operand_object *region_obj2; union acpi_operand_object *region_obj2;
acpi_status status; acpi_status status;
...@@ -394,7 +394,7 @@ acpi_ev_detach_region( ...@@ -394,7 +394,7 @@ acpi_ev_detach_region(
if (!region_obj2) { if (!region_obj2) {
return_VOID; return_VOID;
} }
region_context = region_obj2->extra.region_context; region_context = &region_obj2->extra.region_context;
/* Get the address handler from the region object */ /* Get the address handler from the region object */
...@@ -450,7 +450,7 @@ acpi_ev_detach_region( ...@@ -450,7 +450,7 @@ acpi_ev_detach_region(
region_setup = handler_obj->address_space.setup; region_setup = handler_obj->address_space.setup;
status = region_setup (region_obj, ACPI_REGION_DEACTIVATE, status = region_setup (region_obj, ACPI_REGION_DEACTIVATE,
handler_obj->address_space.context, &region_context); handler_obj->address_space.context, region_context);
/* Init routine may fail, Just ignore errors */ /* Init routine may fail, Just ignore errors */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment