diff options
Diffstat (limited to 'drivers/acpi/button.c')
-rw-r--r-- | drivers/acpi/button.c | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/drivers/acpi/button.c b/drivers/acpi/button.c index 8a95e8329df7..09ca3ce7a051 100644 --- a/drivers/acpi/button.c +++ b/drivers/acpi/button.c | |||
@@ -422,11 +422,9 @@ static int acpi_button_add(struct acpi_device *device) | |||
422 | 422 | ||
423 | if (device->wakeup.flags.valid) { | 423 | if (device->wakeup.flags.valid) { |
424 | /* Button's GPE is run-wake GPE */ | 424 | /* Button's GPE is run-wake GPE */ |
425 | acpi_set_gpe_type(device->wakeup.gpe_device, | ||
426 | device->wakeup.gpe_number, | ||
427 | ACPI_GPE_TYPE_WAKE_RUN); | ||
428 | acpi_enable_gpe(device->wakeup.gpe_device, | 425 | acpi_enable_gpe(device->wakeup.gpe_device, |
429 | device->wakeup.gpe_number); | 426 | device->wakeup.gpe_number, |
427 | ACPI_GPE_TYPE_WAKE_RUN); | ||
430 | device->wakeup.state.enabled = 1; | 428 | device->wakeup.state.enabled = 1; |
431 | } | 429 | } |
432 | 430 | ||
@@ -446,6 +444,13 @@ static int acpi_button_remove(struct acpi_device *device, int type) | |||
446 | { | 444 | { |
447 | struct acpi_button *button = acpi_driver_data(device); | 445 | struct acpi_button *button = acpi_driver_data(device); |
448 | 446 | ||
447 | if (device->wakeup.flags.valid) { | ||
448 | acpi_disable_gpe(device->wakeup.gpe_device, | ||
449 | device->wakeup.gpe_number, | ||
450 | ACPI_GPE_TYPE_WAKE_RUN); | ||
451 | device->wakeup.state.enabled = 0; | ||
452 | } | ||
453 | |||
449 | acpi_button_remove_fs(device); | 454 | acpi_button_remove_fs(device); |
450 | input_unregister_device(button->input); | 455 | input_unregister_device(button->input); |
451 | kfree(button); | 456 | kfree(button); |