patch-2.4.25 linux-2.4.25/drivers/acpi/events/evxfregn.c
Next file: linux-2.4.25/drivers/acpi/executer/exconfig.c
Previous file: linux-2.4.25/drivers/acpi/events/evxfevnt.c
Back to the patch index
Back to the overall index
- Lines: 73
- Date:
2004-02-18 05:36:31.000000000 -0800
- Orig file:
linux-2.4.24/drivers/acpi/events/evxfregn.c
- Orig date:
2003-08-25 04:44:41.000000000 -0700
diff -urN linux-2.4.24/drivers/acpi/events/evxfregn.c linux-2.4.25/drivers/acpi/events/evxfregn.c
@@ -6,7 +6,7 @@
*****************************************************************************/
/*
- * Copyright (C) 2000 - 2003, R. Byron Moore
+ * Copyright (C) 2000 - 2004, R. Byron Moore
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -173,7 +173,7 @@
* The attached device object already exists.
* Make sure the handler is not already installed.
*/
- handler_obj = obj_desc->device.address_space;
+ handler_obj = obj_desc->device.handler;
/* Walk the handler list for this device */
@@ -240,7 +240,8 @@
ACPI_DEBUG_PRINT ((ACPI_DB_OPREGION,
"Installing address handler for region %s(%X) on Device %4.4s %p(%p)\n",
- acpi_ut_get_region_name (space_id), space_id, node->name.ascii, node, obj_desc));
+ acpi_ut_get_region_name (space_id), space_id,
+ acpi_ut_get_node_name (node), node, obj_desc));
/*
* Install the handler
@@ -267,13 +268,13 @@
/* Install at head of Device.address_space list */
- handler_obj->address_space.next = obj_desc->device.address_space;
+ handler_obj->address_space.next = obj_desc->device.handler;
/*
* The Device object is the first reference on the handler_obj.
* Each region that uses the handler adds a reference.
*/
- obj_desc->device.address_space = handler_obj;
+ obj_desc->device.handler = handler_obj;
/*
* Walk the namespace finding all of the regions this
@@ -291,6 +292,17 @@
ACPI_NS_WALK_UNLOCK, acpi_ev_install_handler,
handler_obj, NULL);
+ /*
+ * Now we can run the _REG methods for all Regions for this
+ * space ID. This is a separate walk in order to handle any
+ * interdependencies between regions and _REG methods. (i.e. handlers
+ * must be installed for all regions of this Space ID before we
+ * can run any _REG methods.
+ */
+ status = acpi_ns_walk_namespace (ACPI_TYPE_ANY, device, ACPI_UINT32_MAX,
+ ACPI_NS_WALK_UNLOCK, acpi_ev_reg_run,
+ handler_obj, NULL);
+
unlock_and_exit:
(void) acpi_ut_release_mutex (ACPI_MTX_NAMESPACE);
return_ACPI_STATUS (status);
@@ -357,8 +369,8 @@
/* Find the address handler the user requested */
- handler_obj = obj_desc->device.address_space;
- last_obj_ptr = &obj_desc->device.address_space;
+ handler_obj = obj_desc->device.handler;
+ last_obj_ptr = &obj_desc->device.handler;
while (handler_obj) {
/* We have a handler, see if user requested this one */
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)