Skip to content

Commit 779bac9

Browse files
committed
Revert "ACPI: EC: Evaluate orphan _REG under EC device"
This reverts commit 0e6b6de ("Revert "ACPI: EC: Evaluate orphan _REG under EC device") because the problem addressed by it will be addressed differently in what follows. Signed-off-by: Rafael J. Wysocki <[email protected]> Reviewed-by: Hans de Goede <[email protected]> Cc: All applicable <[email protected]> Link: https://patch.msgid.link/[email protected]
1 parent 7c626ce commit 779bac9

File tree

5 files changed

+5
-66
lines changed

5 files changed

+5
-66
lines changed

drivers/acpi/acpica/acevents.h

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -191,10 +191,6 @@ void
191191
acpi_ev_execute_reg_methods(struct acpi_namespace_node *node,
192192
acpi_adr_space_type space_id, u32 function);
193193

194-
void
195-
acpi_ev_execute_orphan_reg_method(struct acpi_namespace_node *node,
196-
acpi_adr_space_type space_id);
197-
198194
acpi_status
199195
acpi_ev_execute_reg_method(union acpi_operand_object *region_obj, u32 function);
200196

drivers/acpi/acpica/evregion.c

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,10 @@ extern u8 acpi_gbl_default_address_spaces[];
2020

2121
/* Local prototypes */
2222

23+
static void
24+
acpi_ev_execute_orphan_reg_method(struct acpi_namespace_node *device_node,
25+
acpi_adr_space_type space_id);
26+
2327
static acpi_status
2428
acpi_ev_reg_run(acpi_handle obj_handle,
2529
u32 level, void *context, void **return_value);
@@ -814,7 +818,7 @@ acpi_ev_reg_run(acpi_handle obj_handle,
814818
*
815819
******************************************************************************/
816820

817-
void
821+
static void
818822
acpi_ev_execute_orphan_reg_method(struct acpi_namespace_node *device_node,
819823
acpi_adr_space_type space_id)
820824
{

drivers/acpi/acpica/evxfregn.c

Lines changed: 0 additions & 54 deletions
Original file line numberDiff line numberDiff line change
@@ -306,57 +306,3 @@ acpi_execute_reg_methods(acpi_handle device, acpi_adr_space_type space_id)
306306
}
307307

308308
ACPI_EXPORT_SYMBOL(acpi_execute_reg_methods)
309-
310-
/*******************************************************************************
311-
*
312-
* FUNCTION: acpi_execute_orphan_reg_method
313-
*
314-
* PARAMETERS: device - Handle for the device
315-
* space_id - The address space ID
316-
*
317-
* RETURN: Status
318-
*
319-
* DESCRIPTION: Execute an "orphan" _REG method that appears under an ACPI
320-
* device. This is a _REG method that has no corresponding region
321-
* within the device's scope.
322-
*
323-
******************************************************************************/
324-
acpi_status
325-
acpi_execute_orphan_reg_method(acpi_handle device, acpi_adr_space_type space_id)
326-
{
327-
struct acpi_namespace_node *node;
328-
acpi_status status;
329-
330-
ACPI_FUNCTION_TRACE(acpi_execute_orphan_reg_method);
331-
332-
/* Parameter validation */
333-
334-
if (!device) {
335-
return_ACPI_STATUS(AE_BAD_PARAMETER);
336-
}
337-
338-
status = acpi_ut_acquire_mutex(ACPI_MTX_NAMESPACE);
339-
if (ACPI_FAILURE(status)) {
340-
return_ACPI_STATUS(status);
341-
}
342-
343-
/* Convert and validate the device handle */
344-
345-
node = acpi_ns_validate_handle(device);
346-
if (node) {
347-
348-
/*
349-
* If an "orphan" _REG method is present in the device's scope
350-
* for the given address space ID, run it.
351-
*/
352-
353-
acpi_ev_execute_orphan_reg_method(node, space_id);
354-
} else {
355-
status = AE_BAD_PARAMETER;
356-
}
357-
358-
(void)acpi_ut_release_mutex(ACPI_MTX_NAMESPACE);
359-
return_ACPI_STATUS(status);
360-
}
361-
362-
ACPI_EXPORT_SYMBOL(acpi_execute_orphan_reg_method)

drivers/acpi/ec.c

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1507,9 +1507,6 @@ static int ec_install_handlers(struct acpi_ec *ec, struct acpi_device *device,
15071507

15081508
if (call_reg && !test_bit(EC_FLAGS_EC_REG_CALLED, &ec->flags)) {
15091509
acpi_execute_reg_methods(scope_handle, ACPI_ADR_SPACE_EC);
1510-
if (scope_handle != ec->handle)
1511-
acpi_execute_orphan_reg_method(ec->handle, ACPI_ADR_SPACE_EC);
1512-
15131510
set_bit(EC_FLAGS_EC_REG_CALLED, &ec->flags);
15141511
}
15151512

include/acpi/acpixf.h

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -662,10 +662,6 @@ ACPI_EXTERNAL_RETURN_STATUS(acpi_status
662662
acpi_execute_reg_methods(acpi_handle device,
663663
acpi_adr_space_type
664664
space_id))
665-
ACPI_EXTERNAL_RETURN_STATUS(acpi_status
666-
acpi_execute_orphan_reg_method(acpi_handle device,
667-
acpi_adr_space_type
668-
space_id))
669665
ACPI_EXTERNAL_RETURN_STATUS(acpi_status
670666
acpi_remove_address_space_handler(acpi_handle
671667
device,

0 commit comments

Comments
 (0)