|
@@ -844,6 +844,8 @@ static int ec_install_handlers(struct acpi_ec *ec)
|
|
|
|
|
|
static void ec_remove_handlers(struct acpi_ec *ec)
|
|
static void ec_remove_handlers(struct acpi_ec *ec)
|
|
{
|
|
{
|
|
|
|
+ if (!test_bit(EC_FLAGS_HANDLERS_INSTALLED, &ec->flags))
|
|
|
|
+ return;
|
|
acpi_disable_gpe(NULL, ec->gpe);
|
|
acpi_disable_gpe(NULL, ec->gpe);
|
|
if (ACPI_FAILURE(acpi_remove_address_space_handler(ec->handle,
|
|
if (ACPI_FAILURE(acpi_remove_address_space_handler(ec->handle,
|
|
ACPI_ADR_SPACE_EC, &acpi_ec_space_handler)))
|
|
ACPI_ADR_SPACE_EC, &acpi_ec_space_handler)))
|