diff options
| -rw-r--r-- | drivers/acpi/button.c | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/drivers/acpi/button.c b/drivers/acpi/button.c index fcb2eed823c1..236eb025bb0d 100644 --- a/drivers/acpi/button.c +++ b/drivers/acpi/button.c @@ -217,12 +217,8 @@ static void acpi_lid_notify_state(struct acpi_button *button, bool state) * So "last_time" is only updated after a timeout or an actual * switch. */ - if (lid_init_state != ACPI_BUTTON_LID_INIT_IGNORE || - button->last_state != state) - do_update = true; - else - do_update = false; - + do_update = lid_init_state != ACPI_BUTTON_LID_INIT_IGNORE || + button->last_state != state; next_report = ktime_add(button->last_time, ms_to_ktime(lid_report_interval)); if (button->last_state == state && |
