Skip to content

Commit 057edc5

Browse files
committed
ACPI: PM: Register wakeup sources under physical devices
Currently, acpi_add_pm_notifier() registers wakeup sources under ACPI companions of the devices affected by the handling of wakeup events which goes against the rule that a struct acpi_device can only be a parent of another struct acpi_device. Moreover, it would be more logically consistent to register wakeup sources under the devices affected by wakeup events handling which would cause them to appear in more suitable places in sysfs and would help to identify the devices they are associated with more easily. Accordingly, update acpi_add_pm_notifier() to register wakeup sources under the "target" devices directly instead of registering them under the ACPI companions of those devices. Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com> Reviewed-by: Armin Wolf <W_Armin@gmx.de> Link: https://patch.msgid.link/1944126.tdWV9SEqCh@rafael.j.wysocki
1 parent d8a872c commit 057edc5

1 file changed

Lines changed: 1 addition & 2 deletions

File tree

drivers/acpi/device_pm.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -586,8 +586,7 @@ acpi_status acpi_add_pm_notifier(struct acpi_device *adev, struct device *dev,
586586
goto out;
587587

588588
mutex_lock(&acpi_pm_notifier_lock);
589-
adev->wakeup.ws = wakeup_source_register(&adev->dev,
590-
dev_name(&adev->dev));
589+
adev->wakeup.ws = wakeup_source_register(dev, dev_name(&adev->dev));
591590
adev->wakeup.context.dev = dev;
592591
adev->wakeup.context.func = func;
593592
adev->wakeup.flags.notifier_present = true;

0 commit comments

Comments
 (0)