Skip to content

Commit 9a90f1f

Browse files
author
Mukesh Chaurasiya
committed
powerpc/pseries/vas: use default_groups in kobj_type
Bugzilla: https://bugzilla.redhat.com/2130348 commit c31bc04 Author: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Date: Tue Mar 29 16:25:52 2022 +0200 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 <mpe@ellerman.id.au> Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org> Cc: Paul Mackerras <paulus@samba.org> Cc: Haren Myneni <haren@linux.ibm.com> Cc: Nicholas Piggin <npiggin@gmail.com> Cc: linuxppc-dev@lists.ozlabs.org Cc: linux-kernel@vger.kernel.org Link: https://lore.kernel.org/r/20220329142552.558339-1-gregkh@linuxfoundation.org Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Signed-off-by: Mukesh Chaurasiya <mchauras@redhat.com>
1 parent d4980ae commit 9a90f1f

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
@@ -108,13 +108,15 @@ static struct attribute *vas_def_capab_attrs[] = {
108108
&nr_used_credits_attribute.attr,
109109
NULL,
110110
};
111+
ATTRIBUTE_GROUPS(vas_def_capab);
111112

112113
static struct attribute *vas_qos_capab_attrs[] = {
113114
&nr_total_credits_attribute.attr,
114115
&nr_used_credits_attribute.attr,
115116
&update_total_credits_attribute.attr,
116117
NULL,
117118
};
119+
ATTRIBUTE_GROUPS(vas_qos_capab);
118120

119121
static ssize_t vas_type_show(struct kobject *kobj, struct attribute *attr,
120122
char *buf)
@@ -163,13 +165,13 @@ static const struct sysfs_ops vas_sysfs_ops = {
163165
static struct kobj_type vas_def_attr_type = {
164166
.release = vas_type_release,
165167
.sysfs_ops = &vas_sysfs_ops,
166-
.default_attrs = vas_def_capab_attrs,
168+
.default_groups = vas_def_capab_groups,
167169
};
168170

169171
static struct kobj_type vas_qos_attr_type = {
170172
.release = vas_type_release,
171173
.sysfs_ops = &vas_sysfs_ops,
172-
.default_attrs = vas_qos_capab_attrs,
174+
.default_groups = vas_qos_capab_groups,
173175
};
174176

175177
static char *vas_caps_kobj_name(struct vas_caps_entry *centry,

0 commit comments

Comments
 (0)