RE: 2.6.0-test9 regression: panic on Fn+F7 hotkey

Li, Shaohua
2003-10-28T13:42:45Z

Hi,
Sorry, I made a mistake. should be this one.
Because ECDT unusually has similar info with EC. Changing the context should not cause problem.

--- ec.c 2003-10-09 03:24:07.000000000 +0800
+++ ec.c.new 2003-10-28 21:29:51.000000000 +0800
@@ -93,7 +93,7 @@

/* External interfaces use first EC only, so remember */
static struct acpi_device *first_ec;
-
+static struct acpi_device *ec_context;
/* --------------------------------------------------------------------------
Transaction Management
-------------------------------------------------------------------------- */
@@ -342,7 +342,7 @@
acpi_ec_gpe_query (
void *ec_cxt)
{
- struct acpi_ec *ec = (struct acpi_ec *) ec_cxt;
+ struct acpi_ec *ec = ec_context;
u32 value = 0;
unsigned long flags = 0;
static char object_name[5] = {'_','Q','0','0','\0'};
@@ -581,7 +581,7 @@
sprintf(acpi_device_name(device), "%s", ACPI_EC_DEVICE_NAME);
sprintf(acpi_device_class(device), "%s", ACPI_EC_CLASS);
acpi_driver_data(device) = ec;
-
+ ec_context = ec;
/* Use the global lock for all EC transactions? */
acpi_evaluate_integer(ec->handle, "_GLK", NULL, &ec->global_lock);

@@ -793,7 +793,7 @@
/* use the GL just to be safe */
ec_ecdt->global_lock = TRUE;
ec_ecdt->uid = ecdt_ptr->uid;
-
+ ec_context = ec_ecdt;
status = acpi_get_handle(NULL, ecdt_ptr->ec_id, &ec_ecdt->handle);
if (ACPI_FAILURE(status)) {
goto error;