Skip to content

Commit b0bbd86

Browse files
t-8chMike Snitzer
authored andcommitted
dm sysfs: make kobj_type structure constant
Since commit ee6d3dd ("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 <[email protected]> Signed-off-by: Mike Snitzer <[email protected]>
1 parent a7e8f7f commit b0bbd86

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/md/dm-sysfs.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,7 @@ static const struct sysfs_ops dm_sysfs_ops = {
120120
.store = dm_attr_store,
121121
};
122122

123-
static struct kobj_type dm_ktype = {
123+
static const struct kobj_type dm_ktype = {
124124
.sysfs_ops = &dm_sysfs_ops,
125125
.default_groups = dm_groups,
126126
.release = dm_kobject_release,

0 commit comments

Comments
 (0)