Commit 7247f0c2 authored by Rafael J. Wysocki's avatar Rafael J. Wysocki
Browse files

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: default avatarRafael J. Wysocki <rafael.j.wysocki@intel.com>
parent a2b69177
Loading
Loading
Loading
Loading
+2 −13
Original line number Diff line number Diff line
@@ -1489,20 +1489,9 @@ static int ec_install_handlers(struct acpi_ec *ec, struct acpi_device *device)
							    &acpi_ec_space_handler,
							    NULL, ec);
		if (ACPI_FAILURE(status)) {
			if (status == AE_NOT_FOUND) {
				/*
				 * Maybe OS fails in evaluating the _REG
				 * object. The AE_NOT_FOUND error will be
				 * ignored and OS * continue to initialize
				 * EC.
				 */
				pr_err("Fail in evaluating the _REG object"
					" of EC device. Broken bios is suspected.\n");
			} else {
			acpi_ec_stop(ec, false);
			return -ENODEV;
		}
		}
		set_bit(EC_FLAGS_EC_HANDLER_INSTALLED, &ec->flags);
	}