aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/acpi/button.c
diff options
context:
space:
mode:
authorRafael J. Wysocki <rafael.j.wysocki@intel.com>2017-07-03 08:23:09 -0400
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>2017-07-03 08:23:09 -0400
commit8f8e5c3e2796eaf150d6262115af12707c2616dd (patch)
tree85f3ec09ce6960fd57c85610a5c97841f2ded9ba /drivers/acpi/button.c
parent9a5f2c871af4cf6bd63ddb20061faa7049103350 (diff)
parentde3ef1eb1cd0cc3a75f7a3661e10ed827f370ab8 (diff)
Merge branch 'acpi-pm'
* acpi-pm: PM / core: Drop run_wake flag from struct dev_pm_info PCI / PM: Simplify device wakeup settings code PCI / PM: Drop pme_interrupt flag from struct pci_dev ACPI / PM: Consolidate device wakeup settings code ACPI / PM: Drop run_wake from struct acpi_device_wakeup_flags ACPI / sleep: EC-based wakeup from suspend-to-idle on recent systems platform: x86: intel-hid: Wake up the system from suspend-to-idle platform: x86: intel-vbtn: Wake up the system from suspend-to-idle ACPI / PM: Ignore spurious SCI wakeups from suspend-to-idle platform/x86: Add driver for ACPI INT0002 Virtual GPIO device PCI / PM: Restore PME Enable if skipping wakeup setup PM / sleep: Print timing information if debug is enabled ACPI / PM: Clean up device wakeup enable/disable code ACPI / PM: Change log level of wakeup-related message USB / PCI / PM: Allow the PCI core to do the resume cleanup ACPI / PM: Run wakeup notify handlers synchronously Conflicts: drivers/base/power/main.c
Diffstat (limited to 'drivers/acpi/button.c')
-rw-r--r--drivers/acpi/button.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/acpi/button.c b/drivers/acpi/button.c
index e19f530f1083..91cfdf377df7 100644
--- a/drivers/acpi/button.c
+++ b/drivers/acpi/button.c
@@ -217,7 +217,7 @@ static int acpi_lid_notify_state(struct acpi_device *device, int state)
217 } 217 }
218 218
219 if (state) 219 if (state)
220 pm_wakeup_event(&device->dev, 0); 220 acpi_pm_wakeup_event(&device->dev);
221 221
222 ret = blocking_notifier_call_chain(&acpi_lid_notifier, state, device); 222 ret = blocking_notifier_call_chain(&acpi_lid_notifier, state, device);
223 if (ret == NOTIFY_DONE) 223 if (ret == NOTIFY_DONE)
@@ -402,7 +402,7 @@ static void acpi_button_notify(struct acpi_device *device, u32 event)
402 } else { 402 } else {
403 int keycode; 403 int keycode;
404 404
405 pm_wakeup_event(&device->dev, 0); 405 acpi_pm_wakeup_event(&device->dev);
406 if (button->suspended) 406 if (button->suspended)
407 break; 407 break;
408 408
@@ -534,6 +534,7 @@ static int acpi_button_add(struct acpi_device *device)
534 lid_device = device; 534 lid_device = device;
535 } 535 }
536 536
537 device_init_wakeup(&device->dev, true);
537 printk(KERN_INFO PREFIX "%s [%s]\n", name, acpi_device_bid(device)); 538 printk(KERN_INFO PREFIX "%s [%s]\n", name, acpi_device_bid(device));
538 return 0; 539 return 0;
539 540