]> Git Repo - linux.git/commitdiff
zonefs: make kobj_type structure constant
authorThomas Weißschuh <[email protected]>
Fri, 10 Feb 2023 02:14:44 +0000 (02:14 +0000)
committerDamien Le Moal <[email protected]>
Sun, 12 Feb 2023 23:03:48 +0000 (08:03 +0900)
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 <[email protected]>
Reviewed-by: Johannes Thumshirn <[email protected]>
Signed-off-by: Damien Le Moal <[email protected]>
fs/zonefs/sysfs.c

index 9920689dc098d93832491b1b3827c9f57909e1cc..8ccb65c2b419fb44cb5320fb36ac213f6659d260 100644 (file)
@@ -79,7 +79,7 @@ static const struct sysfs_ops zonefs_sysfs_attr_ops = {
        .show   = zonefs_sysfs_attr_show,
 };
 
-static struct kobj_type zonefs_sb_ktype = {
+static const struct kobj_type zonefs_sb_ktype = {
        .default_groups = zonefs_sysfs_groups,
        .sysfs_ops      = &zonefs_sysfs_attr_ops,
        .release        = zonefs_sysfs_sb_release,
This page took 0.042573 seconds and 4 git commands to generate.