platform/x86: asus-armoury: fix sysfs_notify() and pending_reboot for grouped attributes - #9
Closed
Ghoul4500 wants to merge 2 commits into
Closed
Conversation
The store handlers call sysfs_notify(kobj, NULL, attr->attr.name), but kobj is the "attributes" directory and the name is always "current_value". Named groups get no kobject of their own, so the lookup finds nothing and the notify quietly does nothing: a poll() on <attribute>/current_value never wakes up. Pass the group name down so the notify resolves attributes/<group>/current_value. armoury_attr_uint_store() takes a new fsname argument, threaded through __WMI_STORE_INT() and __ROG_TUNABLE_RW(); the hand-written stores pass their own group names. Fixes: f99eb09 ("platform/x86: asus-armoury: move existing tunings to asus-armoury module") Signed-off-by: Ahmed Yaseen <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: f99eb09 ("platform/x86: asus-armoury: move existing tunings to asus-armoury module") Signed-off-by: Ahmed Yaseen <yaseen@ghoul.dev>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes the issue where pending_reboot was not correctly applied when changing some attributes