mirror of
https://github.com/torvalds/linux.git
synced 2026-01-25 07:47:50 +00:00
module: make module_ktype structure constant
Since commit ee6d3dd4ed ("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>
This commit is contained in:
committed by
Luis Chamberlain
parent
efaa2496ba
commit
042edf1ebb
@@ -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,
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user