summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMeng Shao Liu <sau525@gmail.com>2025-07-16 14:46:29 +0800
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2025-07-16 13:32:53 +0200
commitf751fe2a2acbe8cc20da35f118f589ac3b316b78 (patch)
tree5026e93edca04d74cfa36eabf9b5be55497a6606
parent42573e4df8e2318fce6a711e0f9cafc9e3dc1483 (diff)
samples/kobject: make attribute_group const
The attr_group structures are allocated once and never modified at runtime. Also to match the const‑qualified parameter of sysfs_create_group(). Signed-off-by: Meng Shao Liu <sau525@gmail.com> Link: https://lore.kernel.org/r/dc94227eaf337a2b92ab77dffa0da9f7f1f84c4e.1752646650.git.sau525@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-rw-r--r--samples/kobject/kobject-example.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/samples/kobject/kobject-example.c b/samples/kobject/kobject-example.c
index e6d7fc18e433..36d87ca0bee2 100644
--- a/samples/kobject/kobject-example.c
+++ b/samples/kobject/kobject-example.c
@@ -102,7 +102,7 @@ static struct attribute *attrs[] = {
* created for the attributes with the directory being the name of the
* attribute group.
*/
-static struct attribute_group attr_group = {
+static const struct attribute_group attr_group = {
.attrs = attrs,
};