Skip to contentSkip to conversation

ACPI/EC: disable gpe before removing gpe handler

PATCH New Lan Tianyu 1 participant 1 message Dec 12, 2013 ACPI

lore
Share & tools
lore

Lan Tianyu

author
#0 lore raw

PATCH 1/1 ACPI/EC: disable gpe before removing gpe handler

Adjust the order of disabling gpe and removing gpe handler to make sure no gpe after removing gpe handler.

---
 drivers/acpi/ec.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/acpi/ec.c +1 -1
index ff40120..172a124 100644
@@ -778,9 +778,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;
 		}
 	}
Signature · 1 line
1.8.2.1