aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLv Zheng <lv.zheng@intel.com>2015-12-29 01:02:08 -0500
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>2015-12-31 21:47:37 -0500
commitaa6abd2be1cc7fa2593c8377f78420dec0a5d7a5 (patch)
tree732856c0754e0f514756a840be003c59179afdf3
parentf31a99cefd05f798eee8b592e22175ff3fe1876b (diff)
ACPICA: Events: Uses common_notify for address space handlers
ACPICA commit 5ea0fb75fdf1aa7c0aba067dfa4d5dc3a9279461 The address space handlers can be attached to not only Device but also Processor/thermal_zone objects, so it is better to use their common class 'CommonNotify' instead. Lv Zheng. Link: https://github.com/acpica/acpica/commit/5ea0fb75 Signed-off-by: Lv Zheng <lv.zheng@intel.com> Signed-off-by: Bob Moore <robert.moore@intel.com> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
-rw-r--r--drivers/acpi/acpica/dbdisply.c6
-rw-r--r--drivers/acpi/acpica/evhandler.c12
-rw-r--r--drivers/acpi/acpica/evrgnini.c10
-rw-r--r--drivers/acpi/acpica/evxfregn.c4
4 files changed, 13 insertions, 19 deletions
diff --git a/drivers/acpi/acpica/dbdisply.c b/drivers/acpi/acpica/dbdisply.c
index a66b4ae443c9..1965b48d8e83 100644
--- a/drivers/acpi/acpica/dbdisply.c
+++ b/drivers/acpi/acpica/dbdisply.c
@@ -957,7 +957,7 @@ void acpi_db_display_handlers(void)
957 957
958 handler_obj = 958 handler_obj =
959 acpi_ev_find_region_handler(space_id, 959 acpi_ev_find_region_handler(space_id,
960 obj_desc->device. 960 obj_desc->common_notify.
961 handler); 961 handler);
962 if (handler_obj) { 962 if (handler_obj) {
963 acpi_os_printf(ACPI_HANDLER_PRESENT_STRING, 963 acpi_os_printf(ACPI_HANDLER_PRESENT_STRING,
@@ -980,7 +980,7 @@ found_handler: ;
980 980
981 /* Find all handlers for user-defined space_IDs */ 981 /* Find all handlers for user-defined space_IDs */
982 982
983 handler_obj = obj_desc->device.handler; 983 handler_obj = obj_desc->common_notify.handler;
984 while (handler_obj) { 984 while (handler_obj) {
985 if (handler_obj->address_space.space_id >= 985 if (handler_obj->address_space.space_id >=
986 ACPI_USER_REGION_BEGIN) { 986 ACPI_USER_REGION_BEGIN) {
@@ -1082,7 +1082,7 @@ acpi_db_display_non_root_handlers(acpi_handle obj_handle,
1082 1082
1083 /* Display all handlers associated with this device */ 1083 /* Display all handlers associated with this device */
1084 1084
1085 handler_obj = obj_desc->device.handler; 1085 handler_obj = obj_desc->common_notify.handler;
1086 while (handler_obj) { 1086 while (handler_obj) {
1087 acpi_os_printf(ACPI_PREDEFINED_PREFIX, 1087 acpi_os_printf(ACPI_PREDEFINED_PREFIX,
1088 acpi_ut_get_region_name((u8)handler_obj-> 1088 acpi_ut_get_region_name((u8)handler_obj->
diff --git a/drivers/acpi/acpica/evhandler.c b/drivers/acpi/acpica/evhandler.c
index 6a7fc1163bc9..709419c7cde4 100644
--- a/drivers/acpi/acpica/evhandler.c
+++ b/drivers/acpi/acpica/evhandler.c
@@ -159,7 +159,7 @@ acpi_ev_has_default_handler(struct acpi_namespace_node *node,
159 159
160 obj_desc = acpi_ns_get_attached_object(node); 160 obj_desc = acpi_ns_get_attached_object(node);
161 if (obj_desc) { 161 if (obj_desc) {
162 handler_obj = obj_desc->device.handler; 162 handler_obj = obj_desc->common_notify.handler;
163 163
164 /* Walk the linked list of handlers for this object */ 164 /* Walk the linked list of handlers for this object */
165 165
@@ -250,7 +250,8 @@ acpi_ev_install_handler(acpi_handle obj_handle,
250 next_handler_obj = 250 next_handler_obj =
251 acpi_ev_find_region_handler(handler_obj->address_space. 251 acpi_ev_find_region_handler(handler_obj->address_space.
252 space_id, 252 space_id,
253 obj_desc->device.handler); 253 obj_desc->common_notify.
254 handler);
254 if (next_handler_obj) { 255 if (next_handler_obj) {
255 256
256 /* Found a handler, is it for the same address space? */ 257 /* Found a handler, is it for the same address space? */
@@ -444,7 +445,8 @@ acpi_ev_install_space_handler(struct acpi_namespace_node * node,
444 * the handler is not already installed. 445 * the handler is not already installed.
445 */ 446 */
446 handler_obj = acpi_ev_find_region_handler(space_id, 447 handler_obj = acpi_ev_find_region_handler(space_id,
447 obj_desc->device. 448 obj_desc->
449 common_notify.
448 handler); 450 handler);
449 451
450 if (handler_obj) { 452 if (handler_obj) {
@@ -531,13 +533,13 @@ acpi_ev_install_space_handler(struct acpi_namespace_node * node,
531 533
532 /* Install at head of Device.address_space list */ 534 /* Install at head of Device.address_space list */
533 535
534 handler_obj->address_space.next = obj_desc->device.handler; 536 handler_obj->address_space.next = obj_desc->common_notify.handler;
535 537
536 /* 538 /*
537 * The Device object is the first reference on the handler_obj. 539 * The Device object is the first reference on the handler_obj.
538 * Each region that uses the handler adds a reference. 540 * Each region that uses the handler adds a reference.
539 */ 541 */
540 obj_desc->device.handler = handler_obj; 542 obj_desc->common_notify.handler = handler_obj;
541 543
542 /* 544 /*
543 * Walk the namespace finding all of the regions this handler will 545 * Walk the namespace finding all of the regions this handler will
diff --git a/drivers/acpi/acpica/evrgnini.c b/drivers/acpi/acpica/evrgnini.c
index 4df81b5a1751..024689dadcd2 100644
--- a/drivers/acpi/acpica/evrgnini.c
+++ b/drivers/acpi/acpica/evrgnini.c
@@ -566,18 +566,10 @@ acpi_ev_initialize_region(union acpi_operand_object *region_obj,
566 566
567 switch (node->type) { 567 switch (node->type) {
568 case ACPI_TYPE_DEVICE: 568 case ACPI_TYPE_DEVICE:
569
570 handler_obj = obj_desc->device.handler;
571 break;
572
573 case ACPI_TYPE_PROCESSOR: 569 case ACPI_TYPE_PROCESSOR:
574
575 handler_obj = obj_desc->processor.handler;
576 break;
577
578 case ACPI_TYPE_THERMAL: 570 case ACPI_TYPE_THERMAL:
579 571
580 handler_obj = obj_desc->thermal_zone.handler; 572 handler_obj = obj_desc->common_notify.handler;
581 break; 573 break;
582 574
583 case ACPI_TYPE_METHOD: 575 case ACPI_TYPE_METHOD:
diff --git a/drivers/acpi/acpica/evxfregn.c b/drivers/acpi/acpica/evxfregn.c
index dbd9f16a077f..3c905085fe5a 100644
--- a/drivers/acpi/acpica/evxfregn.c
+++ b/drivers/acpi/acpica/evxfregn.c
@@ -216,8 +216,8 @@ acpi_remove_address_space_handler(acpi_handle device,
216 216
217 /* Find the address handler the user requested */ 217 /* Find the address handler the user requested */
218 218
219 handler_obj = obj_desc->device.handler; 219 handler_obj = obj_desc->common_notify.handler;
220 last_obj_ptr = &obj_desc->device.handler; 220 last_obj_ptr = &obj_desc->common_notify.handler;
221 while (handler_obj) { 221 while (handler_obj) {
222 222
223 /* We have a handler, see if user requested this one */ 223 /* We have a handler, see if user requested this one */