Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

dm sysfs: 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>
Signed-off-by: Mike Snitzer <snitzer@kernel.org>

authored by

Thomas Weißschuh and committed by
Mike Snitzer
b0bbd86a a7e8f7fb

+1 -1
+1 -1
drivers/md/dm-sysfs.c
··· 120 120 .store = dm_attr_store, 121 121 }; 122 122 123 - static struct kobj_type dm_ktype = { 123 + static const struct kobj_type dm_ktype = { 124 124 .sysfs_ops = &dm_sysfs_ops, 125 125 .default_groups = dm_groups, 126 126 .release = dm_kobject_release,