Skip to content

Commit 22d74bc

Browse files
t-8chrichardweinberger
authored andcommitted
ubifs: make kobj_type structures 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 definitions to prevent modification at runtime. Signed-off-by: Thomas Weißschuh <[email protected]> Reviewed-by: Zhihao Cheng <[email protected]> Signed-off-by: Richard Weinberger <[email protected]>
1 parent 05b8773 commit 22d74bc

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

fs/ubifs/sysfs.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -74,13 +74,13 @@ static const struct sysfs_ops ubifs_attr_ops = {
7474
.show = ubifs_attr_show,
7575
};
7676

77-
static struct kobj_type ubifs_sb_ktype = {
77+
static const struct kobj_type ubifs_sb_ktype = {
7878
.default_groups = ubifs_groups,
7979
.sysfs_ops = &ubifs_attr_ops,
8080
.release = ubifs_sb_release,
8181
};
8282

83-
static struct kobj_type ubifs_ktype = {
83+
static const struct kobj_type ubifs_ktype = {
8484
.sysfs_ops = &ubifs_attr_ops,
8585
};
8686

0 commit comments

Comments
 (0)