mirror of
https://github.com/tbsdtv/linux_media.git
synced 2025-07-22 20:30:58 +02:00
ubifs: make kobj_type structures constant
Since commit ee6d3dd4ed
("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>
This commit is contained in:
committed by
Richard Weinberger
parent
05b8773ca3
commit
22d74bc26b
@@ -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,
|
||||
};
|
||||
|
||||
|
Reference in New Issue
Block a user