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 <[email protected]> Reviewed-by: Johannes Thumshirn <[email protected]> Signed-off-by: Damien Le Moal <[email protected]>
1 parent 43592c4 commit 2b188a2

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

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)