Home Home > GIT Browse > SLE15
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2019-05-17 16:41:09 +0200
committerTakashi Iwai <tiwai@suse.de>2019-05-17 16:41:17 +0200
commit51d84d734eb99d2ce9b7f4aa64610e2dee1dabb8 (patch)
treeb5488ee1d46e57f3954133adf18d22f1695b7827
parent95c1486ec2422c391e4f8f9056cd5d7c638521ac (diff)
ACPI: button: reinitialize button state upon resume
(bsc#1051510). suse-commit: df10ac309dc77cdf4740a1228a3c541cf643f0be
-rw-r--r--drivers/acpi/button.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/drivers/acpi/button.c b/drivers/acpi/button.c
index 86ea6840525d..28eb273f53bd 100644
--- a/drivers/acpi/button.c
+++ b/drivers/acpi/button.c
@@ -442,8 +442,11 @@ static int acpi_button_resume(struct device *dev)
struct acpi_button *button = acpi_driver_data(device);
button->suspended = false;
- if (button->type == ACPI_BUTTON_TYPE_LID)
+ if (button->type == ACPI_BUTTON_TYPE_LID) {
+ button->last_state = !!acpi_lid_evaluate_state(device);
+ button->last_time = ktime_get();
acpi_lid_initialize_state(device);
+ }
return 0;
}
#endif