summaryrefslogtreecommitdiff
path: root/block/blk-crypto-sysfs.c
diff options
context:
space:
mode:
authorThomas Weißschuh <linux@weissschuh.net>2023-02-08 07:01:22 +0300
committerJens Axboe <axboe@kernel.dk>2023-02-09 19:38:16 +0300
commit5f6224175fbe4c2b91e303c17af4d4eb5e3a60a7 (patch)
tree8fc6f64b728435566204bb7c34ef900d5bae82c8 /block/blk-crypto-sysfs.c
parent23f3e3272e7a4d9fb870485cd6df1e4f9539282c (diff)
downloadlinux-5f6224175fbe4c2b91e303c17af4d4eb5e3a60a7.tar.xz
block: 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> Link: https://lore.kernel.org/r/20230208-kobj_type-block-v1-1-0b3eafd7d983@weissschuh.net Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'block/blk-crypto-sysfs.c')
-rw-r--r--block/blk-crypto-sysfs.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/block/blk-crypto-sysfs.c b/block/blk-crypto-sysfs.c
index 55268edc0625..a304434489ba 100644
--- a/block/blk-crypto-sysfs.c
+++ b/block/blk-crypto-sysfs.c
@@ -116,7 +116,7 @@ static void blk_crypto_release(struct kobject *kobj)
kfree(container_of(kobj, struct blk_crypto_kobj, kobj));
}
-static struct kobj_type blk_crypto_ktype = {
+static const struct kobj_type blk_crypto_ktype = {
.default_groups = blk_crypto_attr_groups,
.sysfs_ops = &blk_crypto_attr_ops,
.release = blk_crypto_release,