[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <3024338.e9J7NaK4W3@rafael.j.wysocki>
Date: Mon, 08 Dec 2025 13:13:01 +0100
From: "Rafael J. Wysocki" <rafael@...nel.org>
To: Linux ACPI <linux-acpi@...r.kernel.org>
Cc: Linux PM <linux-pm@...r.kernel.org>,
Linux PCI <linux-pci@...r.kernel.org>, LKML <linux-kernel@...r.kernel.org>,
Bjorn Helgaas <helgaas@...nel.org>, Armin Wolf <w_armin@....de>
Subject:
[PATCH v1 2/2] ACPI: PM: Register wakeup sources under physical devices
From: Rafael J. Wysocki <rafael.j.wysocki@...el.com>
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@...el.com>
---
drivers/acpi/device_pm.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
--- a/drivers/acpi/device_pm.c
+++ b/drivers/acpi/device_pm.c
@@ -586,8 +586,7 @@ acpi_status acpi_add_pm_notifier(struct
goto out;
mutex_lock(&acpi_pm_notifier_lock);
- adev->wakeup.ws = wakeup_source_register(&adev->dev,
- dev_name(&adev->dev));
+ adev->wakeup.ws = wakeup_source_register(dev, dev_name(&adev->dev));
adev->wakeup.context.dev = dev;
adev->wakeup.context.func = func;
adev->wakeup.flags.notifier_present = true;
Powered by blists - more mailing lists