Skip to content

Commit 7247f0c

Browse files
committed
ACPI: EC: Drop AE_NOT_FOUND special case from ec_install_handlers()
If the status value returned by acpi_install_address_space_handler() in ec_install_handlers() is AE_NOT_FOUND, it is treated in a special way, apparently because it might mean a _REG method evaluation failure (at least that is the case according to the comment in there), but acpi_install_address_space_handler() does not take _REG evaluation errors into account at all, so the AE_NOT_FOUND special handling is confusing at best. For this reason, change ec_install_handlers() to stop the EC and return -ENODEV on all acpi_install_address_space_handler() errors. Signed-off-by: Rafael J. Wysocki <[email protected]>
1 parent a2b6917 commit 7247f0c

File tree

1 file changed

+2
-13
lines changed

1 file changed

+2
-13
lines changed

drivers/acpi/ec.c

Lines changed: 2 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1489,19 +1489,8 @@ static int ec_install_handlers(struct acpi_ec *ec, struct acpi_device *device)
14891489
&acpi_ec_space_handler,
14901490
NULL, ec);
14911491
if (ACPI_FAILURE(status)) {
1492-
if (status == AE_NOT_FOUND) {
1493-
/*
1494-
* Maybe OS fails in evaluating the _REG
1495-
* object. The AE_NOT_FOUND error will be
1496-
* ignored and OS * continue to initialize
1497-
* EC.
1498-
*/
1499-
pr_err("Fail in evaluating the _REG object"
1500-
" of EC device. Broken bios is suspected.\n");
1501-
} else {
1502-
acpi_ec_stop(ec, false);
1503-
return -ENODEV;
1504-
}
1492+
acpi_ec_stop(ec, false);
1493+
return -ENODEV;
15051494
}
15061495
set_bit(EC_FLAGS_EC_HANDLER_INSTALLED, &ec->flags);
15071496
}

0 commit comments

Comments
 (0)