]> www.infradead.org Git - users/willy/pagecache.git/commit
module: sysfs: Add notes attributes through attribute_group
authorThomas Weißschuh <linux@weissschuh.net>
Fri, 27 Dec 2024 13:23:24 +0000 (14:23 +0100)
committerPetr Pavlu <petr.pavlu@suse.com>
Sun, 26 Jan 2025 12:05:24 +0000 (13:05 +0100)
commit4723f16de64e1580ec5dc15173f8da0b316b2257
treec21335c8aaf1a28c26ef2ec17f21df56201d81cb
parentf47c0bebed44673c54a6a1870f04a2261db28ca0
module: sysfs: Add notes attributes through attribute_group

A kobject is meant to manage the lifecycle of some resource.
However the module sysfs code only creates a kobject to get a
"notes" subdirectory in sysfs.
This can be achieved easier and cheaper by using a sysfs group.
Switch the notes attribute code to such a group, similar to how the
section allocation in the same file already works.

Signed-off-by: Thomas Weißschuh <linux@weissschuh.net>
Reviewed-by: Petr Pavlu <petr.pavlu@suse.com>
Reviewed-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Link: https://lore.kernel.org/r/20241227-sysfs-const-bin_attr-module-v2-5-e267275f0f37@weissschuh.net
Signed-off-by: Petr Pavlu <petr.pavlu@suse.com>
kernel/module/sysfs.c