From: Heiner Kallweit <hkallweit1@gmail.com>
To: "Rafael J. Wysocki" <rafael@kernel.org>,
Pavel Machek <pavel@kernel.org>, Len Brown <lenb@kernel.org>,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
Danilo Krummrich <dakr@kernel.org>
Cc: Linux PM <linux-pm@vger.kernel.org>, driver-core@lists.linux.dev
Subject: [PATCH] PM / wakeup: Register class wakeup in pure_initcall phase
Date: Fri, 3 Apr 2026 18:09:59 +0200 [thread overview]
Message-ID: <ac269a91-0ba0-4798-acc6-ec294926bbb0@gmail.com> (raw)
Wakeup sources (e.g. autosleep) can be created as early as core_initcall.
Class wakeup is registered in postcore_initcall only, what results in
autosleep wakeup source not being shown in sysfs. To fix this,
register class wakeup in pure_initcall phase already.
The current behavior doesn't cause any known issue, therefore treat
the change as an improvement.
Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com>
---
drivers/base/power/wakeup_stats.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/base/power/wakeup_stats.c b/drivers/base/power/wakeup_stats.c
index 308f8bde9..30f0d3d61 100644
--- a/drivers/base/power/wakeup_stats.c
+++ b/drivers/base/power/wakeup_stats.c
@@ -216,4 +216,4 @@ static int __init wakeup_sources_sysfs_init(void)
return PTR_ERR_OR_ZERO(wakeup_class);
}
-postcore_initcall(wakeup_sources_sysfs_init);
+pure_initcall(wakeup_sources_sysfs_init);
--
2.53.0
next reply other threads:[~2026-04-03 16:10 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-04-03 16:09 Heiner Kallweit [this message]
2026-04-03 17:24 ` [PATCH] PM / wakeup: Register class wakeup in pure_initcall phase Greg Kroah-Hartman
2026-04-06 15:17 ` Rafael J. Wysocki
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=ac269a91-0ba0-4798-acc6-ec294926bbb0@gmail.com \
--to=hkallweit1@gmail.com \
--cc=dakr@kernel.org \
--cc=driver-core@lists.linux.dev \
--cc=gregkh@linuxfoundation.org \
--cc=lenb@kernel.org \
--cc=linux-pm@vger.kernel.org \
--cc=pavel@kernel.org \
--cc=rafael@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox