From b0bbd86a288ab35234edb704935982c20f74628d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thomas=20Wei=C3=9Fschuh?= Date: Tue, 14 Feb 2023 03:20:55 +0000 Subject: [PATCH] dm sysfs: make kobj_type structure constant MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 Signed-off-by: Mike Snitzer --- drivers/md/dm-sysfs.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/md/dm-sysfs.c b/drivers/md/dm-sysfs.c index 5dce0f450dda..bfaef27ca79f 100644 --- a/drivers/md/dm-sysfs.c +++ b/drivers/md/dm-sysfs.c @@ -120,7 +120,7 @@ static const struct sysfs_ops dm_sysfs_ops = { .store = dm_attr_store, }; -static struct kobj_type dm_ktype = { +static const struct kobj_type dm_ktype = { .sysfs_ops = &dm_sysfs_ops, .default_groups = dm_groups, .release = dm_kobject_release,