Skip to content

Commit c31bc04

Browse files
committed
powerpc/pseries/vas: 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 pseries vas 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. Cc: Michael Ellerman <[email protected]> Cc: Benjamin Herrenschmidt <[email protected]> Cc: Paul Mackerras <[email protected]> Cc: Haren Myneni <[email protected]> Cc: Nicholas Piggin <[email protected]> Cc: [email protected] Cc: [email protected] Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Greg Kroah-Hartman <[email protected]>
1 parent 3123109 commit c31bc04

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

arch/powerpc/platforms/pseries/vas-sysfs.c

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -99,13 +99,15 @@ static struct attribute *vas_def_capab_attrs[] = {
9999
&nr_used_credits_attribute.attr,
100100
NULL,
101101
};
102+
ATTRIBUTE_GROUPS(vas_def_capab);
102103

103104
static struct attribute *vas_qos_capab_attrs[] = {
104105
&nr_total_credits_attribute.attr,
105106
&nr_used_credits_attribute.attr,
106107
&update_total_credits_attribute.attr,
107108
NULL,
108109
};
110+
ATTRIBUTE_GROUPS(vas_qos_capab);
109111

110112
static ssize_t vas_type_show(struct kobject *kobj, struct attribute *attr,
111113
char *buf)
@@ -154,13 +156,13 @@ static const struct sysfs_ops vas_sysfs_ops = {
154156
static struct kobj_type vas_def_attr_type = {
155157
.release = vas_type_release,
156158
.sysfs_ops = &vas_sysfs_ops,
157-
.default_attrs = vas_def_capab_attrs,
159+
.default_groups = vas_def_capab_groups,
158160
};
159161

160162
static struct kobj_type vas_qos_attr_type = {
161163
.release = vas_type_release,
162164
.sysfs_ops = &vas_sysfs_ops,
163-
.default_attrs = vas_qos_capab_attrs,
165+
.default_groups = vas_qos_capab_groups,
164166
};
165167

166168
static char *vas_caps_kobj_name(struct vas_caps_entry *centry,

0 commit comments

Comments
 (0)