aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/fs/ubifs
diff options
context:
space:
mode:
authorThomas Weißschuh <linux@weissschuh.net>2023-02-10 02:16:13 +0000
committerRichard Weinberger <richard@nod.at>2023-02-13 22:29:54 +0100
commit22d74bc26bbfde150f602b2a6e93fb11df30ce0b (patch)
tree02242d9b3dcb685aeb6dd22daf4867e74722fe7a /fs/ubifs
parentmtd: ubi: block: wire-up device parent (diff)
downloadwireguard-linux-22d74bc26bbfde150f602b2a6e93fb11df30ce0b.tar.xz
wireguard-linux-22d74bc26bbfde150f602b2a6e93fb11df30ce0b.zip
ubifs: make kobj_type structures 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 definitions to prevent modification at runtime. Signed-off-by: Thomas Weißschuh <linux@weissschuh.net> Reviewed-by: Zhihao Cheng <chengzhihao1@huawei.com> Signed-off-by: Richard Weinberger <richard@nod.at>
Diffstat (limited to 'fs/ubifs')
-rw-r--r--fs/ubifs/sysfs.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/fs/ubifs/sysfs.c b/fs/ubifs/sysfs.c
index 54270ad36321..1c958148bb87 100644
--- a/fs/ubifs/sysfs.c
+++ b/fs/ubifs/sysfs.c
@@ -74,13 +74,13 @@ static const struct sysfs_ops ubifs_attr_ops = {
.show = ubifs_attr_show,
};
-static struct kobj_type ubifs_sb_ktype = {
+static const struct kobj_type ubifs_sb_ktype = {
.default_groups = ubifs_groups,
.sysfs_ops = &ubifs_attr_ops,
.release = ubifs_sb_release,
};
-static struct kobj_type ubifs_ktype = {
+static const struct kobj_type ubifs_ktype = {
.sysfs_ops = &ubifs_attr_ops,
};