Skip to content

Commit eaac0b5

Browse files
gregkhsnitm
authored andcommitted
dm sysfs: use default_groups in kobj_type
There are currently 2 ways to create a set of sysfs files for a kobj_type, through the default_attrs field, and the default_groups field. Move the dm sysfs code to use default_groups field which has been the preferred way since aa30f47 ("kobject: Add support for default attribute groups to kobj_type") so that we can soon get rid of the obsolete default_attrs field. Signed-off-by: Greg Kroah-Hartman <[email protected]> Signed-off-by: Mike Snitzer <[email protected]>
1 parent f069c7a commit eaac0b5

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

drivers/md/dm-sysfs.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -112,6 +112,7 @@ static struct attribute *dm_attrs[] = {
112112
&dm_attr_rq_based_seq_io_merge_deadline.attr,
113113
NULL,
114114
};
115+
ATTRIBUTE_GROUPS(dm);
115116

116117
static const struct sysfs_ops dm_sysfs_ops = {
117118
.show = dm_attr_show,
@@ -120,7 +121,7 @@ static const struct sysfs_ops dm_sysfs_ops = {
120121

121122
static struct kobj_type dm_ktype = {
122123
.sysfs_ops = &dm_sysfs_ops,
123-
.default_attrs = dm_attrs,
124+
.default_groups = dm_groups,
124125
.release = dm_kobject_release,
125126
};
126127

0 commit comments

Comments
 (0)