Explorar o código

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 <tianyu.lan@intel.com>
[rjw: Changelog]
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Lan Tianyu %!s(int64=12) %!d(string=hai) anos
pai
achega
42b946bb35
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      drivers/acpi/ec.c

+ 1 - 1
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;
 		}
 	}