Skip to content

Commit 2b188a2

Browse files
t-8chDamien Le Moal
authored andcommitted
zonefs: make kobj_type structure constant
Since commit ee6d3dd ("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> Reviewed-by: Johannes Thumshirn <johannes.thumshirn@wdc.com> Signed-off-by: Damien Le Moal <damien.lemoal@opensource.wdc.com>
1 parent 43592c4 commit 2b188a2

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

fs/zonefs/sysfs.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ static const struct sysfs_ops zonefs_sysfs_attr_ops = {
7979
.show = zonefs_sysfs_attr_show,
8080
};
8181

82-
static struct kobj_type zonefs_sb_ktype = {
82+
static const struct kobj_type zonefs_sb_ktype = {
8383
.default_groups = zonefs_sysfs_groups,
8484
.sysfs_ops = &zonefs_sysfs_attr_ops,
8585
.release = zonefs_sysfs_sb_release,

0 commit comments

Comments
 (0)