diff options
author | Thomas Weißschuh <linux@weissschuh.net> | 2023-02-10 02:14:44 +0000 |
---|---|---|
committer | Damien Le Moal <damien.lemoal@opensource.wdc.com> | 2023-02-13 08:03:48 +0900 |
commit | 2b188a2cfc4d8f319ad23832ec1390bdae52daf6 (patch) | |
tree | e42e8510807184be2a88c8371a7bc44722c2c8a6 /fs/zonefs | |
parent | 43592c46375a056b411b065acf2d37fc1e3ab251 (diff) |
zonefs: make kobj_type structure 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 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>
Diffstat (limited to 'fs/zonefs')
-rw-r--r-- | fs/zonefs/sysfs.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/zonefs/sysfs.c b/fs/zonefs/sysfs.c index 9920689dc098..8ccb65c2b419 100644 --- a/fs/zonefs/sysfs.c +++ b/fs/zonefs/sysfs.c @@ -79,7 +79,7 @@ static const struct sysfs_ops zonefs_sysfs_attr_ops = { .show = zonefs_sysfs_attr_show, }; -static struct kobj_type zonefs_sb_ktype = { +static const struct kobj_type zonefs_sb_ktype = { .default_groups = zonefs_sysfs_groups, .sysfs_ops = &zonefs_sysfs_attr_ops, .release = zonefs_sysfs_sb_release, |