mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/herbert/cryptodev-2.6.git
synced 2026-05-02 18:17:50 -04:00
block: 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>
Link: https://lore.kernel.org/r/20230208-kobj_type-block-v1-1-0b3eafd7d983@weissschuh.net
Signed-off-by: Jens Axboe <axboe@kernel.dk>
This commit is contained in:
committed by
Jens Axboe
parent
23f3e3272e
commit
5f6224175f
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user