diff options
Diffstat (limited to 'drivers/acpi/events/evregion.c')
-rw-r--r-- | drivers/acpi/events/evregion.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/drivers/acpi/events/evregion.c b/drivers/acpi/events/evregion.c index 6da58e776413..b831ec4bcae7 100644 --- a/drivers/acpi/events/evregion.c +++ b/drivers/acpi/events/evregion.c | |||
@@ -164,6 +164,7 @@ acpi_status acpi_ev_initialize_op_regions(void) | |||
164 | * Run the _REG methods for op_regions in each default address space | 164 | * Run the _REG methods for op_regions in each default address space |
165 | */ | 165 | */ |
166 | for (i = 0; i < ACPI_NUM_DEFAULT_SPACES; i++) { | 166 | for (i = 0; i < ACPI_NUM_DEFAULT_SPACES; i++) { |
167 | |||
167 | /* TBD: Make sure handler is the DEFAULT handler, otherwise | 168 | /* TBD: Make sure handler is the DEFAULT handler, otherwise |
168 | * _REG will have already been run. | 169 | * _REG will have already been run. |
169 | */ | 170 | */ |
@@ -315,6 +316,7 @@ acpi_ev_address_space_dispatch(union acpi_operand_object *region_obj, | |||
315 | */ | 316 | */ |
316 | region_setup = handler_desc->address_space.setup; | 317 | region_setup = handler_desc->address_space.setup; |
317 | if (!region_setup) { | 318 | if (!region_setup) { |
319 | |||
318 | /* No initialization routine, exit with error */ | 320 | /* No initialization routine, exit with error */ |
319 | 321 | ||
320 | ACPI_ERROR((AE_INFO, | 322 | ACPI_ERROR((AE_INFO, |
@@ -361,6 +363,7 @@ acpi_ev_address_space_dispatch(union acpi_operand_object *region_obj, | |||
361 | region_obj->region.flags |= AOPOBJ_SETUP_COMPLETE; | 363 | region_obj->region.flags |= AOPOBJ_SETUP_COMPLETE; |
362 | 364 | ||
363 | if (region_obj2->extra.region_context) { | 365 | if (region_obj2->extra.region_context) { |
366 | |||
364 | /* The handler for this region was already installed */ | 367 | /* The handler for this region was already installed */ |
365 | 368 | ||
366 | ACPI_MEM_FREE(region_context); | 369 | ACPI_MEM_FREE(region_context); |
@@ -463,6 +466,7 @@ acpi_ev_detach_region(union acpi_operand_object *region_obj, | |||
463 | 466 | ||
464 | handler_obj = region_obj->region.handler; | 467 | handler_obj = region_obj->region.handler; |
465 | if (!handler_obj) { | 468 | if (!handler_obj) { |
469 | |||
466 | /* This region has no handler, all done */ | 470 | /* This region has no handler, all done */ |
467 | 471 | ||
468 | return_VOID; | 472 | return_VOID; |
@@ -474,6 +478,7 @@ acpi_ev_detach_region(union acpi_operand_object *region_obj, | |||
474 | last_obj_ptr = &handler_obj->address_space.region_list; | 478 | last_obj_ptr = &handler_obj->address_space.region_list; |
475 | 479 | ||
476 | while (obj_desc) { | 480 | while (obj_desc) { |
481 | |||
477 | /* Is this the correct Region? */ | 482 | /* Is this the correct Region? */ |
478 | 483 | ||
479 | if (obj_desc == region_obj) { | 484 | if (obj_desc == region_obj) { |
@@ -666,6 +671,7 @@ acpi_ev_install_handler(acpi_handle obj_handle, | |||
666 | 671 | ||
667 | obj_desc = acpi_ns_get_attached_object(node); | 672 | obj_desc = acpi_ns_get_attached_object(node); |
668 | if (!obj_desc) { | 673 | if (!obj_desc) { |
674 | |||
669 | /* No object, just exit */ | 675 | /* No object, just exit */ |
670 | 676 | ||
671 | return (AE_OK); | 677 | return (AE_OK); |
@@ -674,10 +680,12 @@ acpi_ev_install_handler(acpi_handle obj_handle, | |||
674 | /* Devices are handled different than regions */ | 680 | /* Devices are handled different than regions */ |
675 | 681 | ||
676 | if (ACPI_GET_OBJECT_TYPE(obj_desc) == ACPI_TYPE_DEVICE) { | 682 | if (ACPI_GET_OBJECT_TYPE(obj_desc) == ACPI_TYPE_DEVICE) { |
683 | |||
677 | /* Check if this Device already has a handler for this address space */ | 684 | /* Check if this Device already has a handler for this address space */ |
678 | 685 | ||
679 | next_handler_obj = obj_desc->device.handler; | 686 | next_handler_obj = obj_desc->device.handler; |
680 | while (next_handler_obj) { | 687 | while (next_handler_obj) { |
688 | |||
681 | /* Found a handler, is it for the same address space? */ | 689 | /* Found a handler, is it for the same address space? */ |
682 | 690 | ||
683 | if (next_handler_obj->address_space.space_id == | 691 | if (next_handler_obj->address_space.space_id == |
@@ -839,6 +847,7 @@ acpi_ev_install_space_handler(struct acpi_namespace_node * node, | |||
839 | /* Walk the handler list for this device */ | 847 | /* Walk the handler list for this device */ |
840 | 848 | ||
841 | while (handler_obj) { | 849 | while (handler_obj) { |
850 | |||
842 | /* Same space_id indicates a handler already installed */ | 851 | /* Same space_id indicates a handler already installed */ |
843 | 852 | ||
844 | if (handler_obj->address_space.space_id == space_id) { | 853 | if (handler_obj->address_space.space_id == space_id) { |
@@ -1035,6 +1044,7 @@ acpi_ev_reg_run(acpi_handle obj_handle, | |||
1035 | 1044 | ||
1036 | obj_desc = acpi_ns_get_attached_object(node); | 1045 | obj_desc = acpi_ns_get_attached_object(node); |
1037 | if (!obj_desc) { | 1046 | if (!obj_desc) { |
1047 | |||
1038 | /* No object, just exit */ | 1048 | /* No object, just exit */ |
1039 | 1049 | ||
1040 | return (AE_OK); | 1050 | return (AE_OK); |