From: Lan Tianyu Date: Thu, 12 Dec 2013 10:08:52 +0000 (+0800) Subject: ACPI / EC: disable GPE before removing GPE handler X-Git-Tag: v3.14-rc1~107^2~8^2 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=42b946bb35ef0057f13887dec5f081df0ba8840a;p=thirdparty%2Fkernel%2Flinux.git ACPI / EC: disable GPE before removing GPE handler Adjust the order of disabling the EC GPE and removing its handler to avoid unhandled events. Signed-off-by: Lan Tianyu [rjw: Changelog] Signed-off-by: Rafael J. Wysocki --- diff --git a/drivers/acpi/ec.c b/drivers/acpi/ec.c index ba5b56db9d27c..7dac048e8f07a 100644 --- a/drivers/acpi/ec.c +++ b/drivers/acpi/ec.c @@ -779,9 +779,9 @@ static int ec_install_handlers(struct acpi_ec *ec) pr_err("Fail in evaluating the _REG object" " of EC device. Broken bios is suspected.\n"); } else { + acpi_disable_gpe(NULL, ec->gpe); acpi_remove_gpe_handler(NULL, ec->gpe, &acpi_ec_gpe_handler); - acpi_disable_gpe(NULL, ec->gpe); return -ENODEV; } }