From: Thomas Weißschuh Date: Fri, 10 Feb 2023 02:14:44 +0000 (+0000) Subject: zonefs: make kobj_type structure constant X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=2b188a2cfc4d8f319ad23832ec1390bdae52daf6;p=linux.git zonefs: make kobj_type 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 Reviewed-by: Johannes Thumshirn Signed-off-by: Damien Le Moal --- diff --git a/fs/zonefs/sysfs.c b/fs/zonefs/sysfs.c index 9920689dc098d..8ccb65c2b419f 100644 --- a/fs/zonefs/sysfs.c +++ b/fs/zonefs/sysfs.c @@ -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,