From: Ahmed Yaseen <yaseen@ghoul.dev>
To: "Ilpo Järvinen" <ilpo.jarvinen@linux.intel.com>,
"Hans de Goede" <hansg@kernel.org>,
"Corentin Chary" <corentin.chary@gmail.com>,
"Luke D. Jones" <luke@ljones.dev>,
"Denis Benato" <denis.benato@linux.dev>
Cc: Mario Limonciello <mario.limonciello@amd.com>,
platform-driver-x86@vger.kernel.org,
linux-kernel@vger.kernel.org, Ahmed Yaseen <yaseen@ghoul.dev>
Subject: [PATCH 2/2] platform/x86: asus-armoury: fix pending_reboot for grouped attributes
Date: Fri, 28 Aug 2026 11:12:57 +0000 [thread overview]
Message-ID: <20260828111232.74443-3-yaseen@ghoul.dev> (raw)
In-Reply-To: <20260828111232.74443-1-yaseen@ghoul.dev>
asus_bios_requires_reboot() matches attr->attr.name against
"gpu_mux_mode" and "panel_hd_mode", but callers hand it a current_value
attribute, and that name is always "current_value". The match never
hits, so panel_hd_mode never sets pending_reboot or emits the
KOBJ_CHANGE uevent. gpu_mux_mode gets away with it because its
hand-written store signals the event itself.
Match on the group name instead, which armoury_attr_uint_store() now
has at hand.
Fixes: f99eb098090e ("platform/x86: asus-armoury: move existing tunings to asus-armoury module")
Signed-off-by: Ahmed Yaseen <yaseen@ghoul.dev>
---
drivers/platform/x86/asus-armoury.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/drivers/platform/x86/asus-armoury.c b/drivers/platform/x86/asus-armoury.c
index 8e85fb08bd59..23aabc827e39 100644
--- a/drivers/platform/x86/asus-armoury.c
+++ b/drivers/platform/x86/asus-armoury.c
@@ -128,10 +128,10 @@ static ssize_t pending_reboot_show(struct kobject *kobj, struct kobj_attribute *
static struct kobj_attribute pending_reboot = __ATTR_RO(pending_reboot);
-static bool asus_bios_requires_reboot(struct kobj_attribute *attr)
+static bool asus_bios_requires_reboot(const char *fsname)
{
- return !strcmp(attr->attr.name, "gpu_mux_mode") ||
- !strcmp(attr->attr.name, "panel_hd_mode");
+ return !strcmp(fsname, "gpu_mux_mode") ||
+ !strcmp(fsname, "panel_hd_mode");
}
/**
@@ -315,7 +315,7 @@ ssize_t armoury_attr_uint_store(struct kobject *kobj, struct kobj_attribute *att
*store_value = value;
sysfs_notify(kobj, fsname, attr->attr.name);
- if (asus_bios_requires_reboot(attr))
+ if (asus_bios_requires_reboot(fsname))
asus_set_reboot_and_signal_event();
return count;
--
2.55.0
prev parent reply other threads:[~2026-08-28 11:13 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-08-28 11:12 [PATCH 0/2] platform/x86: asus-armoury: fix notifications " Ahmed Yaseen
2026-08-28 11:12 ` [PATCH 1/2] platform/x86: asus-armoury: fix sysfs_notify() of " Ahmed Yaseen
2026-08-28 11:12 ` Ahmed Yaseen [this message]
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=20260828111232.74443-3-yaseen@ghoul.dev \
--to=yaseen@ghoul.dev \
--cc=corentin.chary@gmail.com \
--cc=denis.benato@linux.dev \
--cc=hansg@kernel.org \
--cc=ilpo.jarvinen@linux.intel.com \
--cc=linux-kernel@vger.kernel.org \
--cc=luke@ljones.dev \
--cc=mario.limonciello@amd.com \
--cc=platform-driver-x86@vger.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
all inboxes | Powered by JetHome®