aboutsummaryrefslogtreecommitdiff
path: root/include/acpi
diff options
context:
space:
mode:
authorRafael J. Wysocki2017-06-12 22:48:41 +0200
committerRafael J. Wysocki2017-06-15 00:55:42 +0200
commit64fd1c7040880292710e6592ddc88d0d73cfb6fb (patch)
tree8b0527537fdc5cadd399266cdd3741188a6212d4 /include/acpi
parent32c1431eea4881a6b17bd7c639315010aeefa452 (diff)
ACPI / PM: Run wakeup notify handlers synchronously
The work functions provided by the users of acpi_add_pm_notifier() should be run synchronously before re-enabling the wakeup GPE in case they are used to clear the status and/or disable the wakeup signaling at the source. Otherwise, which is the case currently in the PCI bus type code, the same wakeup event may be signaled for multiple times while the execution of the work function in response to it has already been queued up. Fortunately, acpi_add_pm_notifier() is only used by PCI and by ACPI device PM code internally, so the change is relatively straightforward to make. Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com> Acked-by: Bjorn Helgaas <bhelgaas@google.com>
Diffstat (limited to 'include/acpi')
-rw-r--r--include/acpi/acpi_bus.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/include/acpi/acpi_bus.h b/include/acpi/acpi_bus.h
index 197f3fffc9a7..79c0af419300 100644
--- a/include/acpi/acpi_bus.h
+++ b/include/acpi/acpi_bus.h
@@ -319,7 +319,7 @@ struct acpi_device_wakeup_flags {
};
struct acpi_device_wakeup_context {
- struct work_struct work;
+ void (*func)(struct acpi_device_wakeup_context *context);
struct device *dev;
};
@@ -599,7 +599,7 @@ static inline bool acpi_device_always_present(struct acpi_device *adev)
#ifdef CONFIG_PM
acpi_status acpi_add_pm_notifier(struct acpi_device *adev, struct device *dev,
- void (*work_func)(struct work_struct *work));
+ void (*func)(struct acpi_device_wakeup_context *context));
acpi_status acpi_remove_pm_notifier(struct acpi_device *adev);
int acpi_pm_device_sleep_state(struct device *, int *, int);
int acpi_pm_device_run_wake(struct device *, bool);