summaryrefslogtreecommitdiffstats
path: root/kernel/params.c
diff options
context:
space:
mode:
authorThomas Weißschuh <linux@weissschuh.net>2023-02-04 06:44:46 +0100
committerLuis Chamberlain <mcgrof@kernel.org>2023-03-09 21:55:15 +0100
commit042edf1ebb49a63f299c4cdfb9c1e2ba299c0b91 (patch)
tree82a65ba20c305d774b164f8eb196ff1b89b2fac5 /kernel/params.c
parentmodule: fix MIPS module_layout -> module_memory (diff)
downloadlinux-042edf1ebb49a63f299c4cdfb9c1e2ba299c0b91.tar.xz
linux-042edf1ebb49a63f299c4cdfb9c1e2ba299c0b91.zip
module: make module_ktype structure constant
Since commit ee6d3dd4ed48 ("driver core: make kobj_type constant.") the driver core allows the usage of const struct kobj_type. Take advantage of this to constify the structure definition to prevent modification at runtime. Signed-off-by: Thomas Weißschuh <linux@weissschuh.net> Signed-off-by: Luis Chamberlain <mcgrof@kernel.org>
Diffstat (limited to '')
-rw-r--r--kernel/params.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/kernel/params.c b/kernel/params.c
index 6e34ca89ebae..6a7548979aa9 100644
--- a/kernel/params.c
+++ b/kernel/params.c
@@ -948,7 +948,7 @@ static void module_kobj_release(struct kobject *kobj)
complete(mk->kobj_completion);
}
-struct kobj_type module_ktype = {
+const struct kobj_type module_ktype = {
.release = module_kobj_release,
.sysfs_ops = &module_sysfs_ops,
};