aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/acpi/button.c
diff options
context:
space:
mode:
authorLv Zheng <lv.zheng@intel.com>2016-06-01 06:10:34 -0400
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>2016-06-21 20:10:14 -0400
commitc2dd420034f24f356b86f90222ef19148b82a5c1 (patch)
tree505ca38e6ad6a28be2057a6f8c6ffc21c1792992 /drivers/acpi/button.c
parent33688abb2802ff3a230bd2441f765477b94cc89e (diff)
ACPI / button: Remove initial lid state notification
The _LID control method's initial returning value is not reliable. The _LID control method is described to return the "current" lid state. However the word of "current" has ambiguity, many BIOSen return the lid state upon the last lid notification instead of returning the lid state upon the last _LID evaluation. There won't be difference when the _LID control method is evaluated during the runtime, the problem is its initial returning value. When the BIOSen implement this control method with cached value, the initial returning value is likely not reliable. There are simply so many examples retuning "close" as initial lid state (Link 1), sending this state to the userspace causes suspending right after booting/resuming. Since the lid state is implemented by the BIOSen, the kernel lid driver has no idea how it can be correct, this patch stops sending the initial lid state to the userspace to try to avoid sending the wrong lid state to the userspace to trigger such kind of wrong suspending. This actually reverts the following commit introduced for fixing a Novell bug: Commit: 23de5d9ef2a4bbc4f733f58311bcb7cf6239c813 Subject: ACPI: button: send initial lid state after add and resume Link: https://bugzilla.kernel.org/show_bug.cgi?id=89211 Link: https://bugzilla.kernel.org/show_bug.cgi?id=106151 Link: https://bugzilla.kernel.org/show_bug.cgi?id=106941 Link: https://bugzilla.novell.com/show_bug.cgi?id=326814 Signed-off-by: Lv Zheng <lv.zheng@intel.com> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Diffstat (limited to 'drivers/acpi/button.c')
-rw-r--r--drivers/acpi/button.c3
1 files changed, 0 insertions, 3 deletions
diff --git a/drivers/acpi/button.c b/drivers/acpi/button.c
index 5c3b0918d5fd..9863278eb089 100644
--- a/drivers/acpi/button.c
+++ b/drivers/acpi/button.c
@@ -334,8 +334,6 @@ static int acpi_button_resume(struct device *dev)
334 struct acpi_button *button = acpi_driver_data(device); 334 struct acpi_button *button = acpi_driver_data(device);
335 335
336 button->suspended = false; 336 button->suspended = false;
337 if (button->type == ACPI_BUTTON_TYPE_LID)
338 return acpi_lid_send_state(device);
339 return 0; 337 return 0;
340} 338}
341#endif 339#endif
@@ -416,7 +414,6 @@ static int acpi_button_add(struct acpi_device *device)
416 if (error) 414 if (error)
417 goto err_remove_fs; 415 goto err_remove_fs;
418 if (button->type == ACPI_BUTTON_TYPE_LID) { 416 if (button->type == ACPI_BUTTON_TYPE_LID) {
419 acpi_lid_send_state(device);
420 /* 417 /*
421 * This assumes there's only one lid device, or if there are 418 * This assumes there's only one lid device, or if there are
422 * more we only care about the last one... 419 * more we only care about the last one...