Skip to content

Commit 32a1bda

Browse files
gregkhmpe
authored andcommitted
powerpc/opal: 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 powerpc opal dump and elog 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: Michael Ellerman <[email protected]> Link: https://lore.kernel.org/r/[email protected]
1 parent 2bdf3f9 commit 32a1bda

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

arch/powerpc/platforms/powernv/opal-dump.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -208,11 +208,12 @@ static struct attribute *dump_default_attrs[] = {
208208
&ack_attribute.attr,
209209
NULL,
210210
};
211+
ATTRIBUTE_GROUPS(dump_default);
211212

212213
static struct kobj_type dump_ktype = {
213214
.sysfs_ops = &dump_sysfs_ops,
214215
.release = &dump_release,
215-
.default_attrs = dump_default_attrs,
216+
.default_groups = dump_default_groups,
216217
};
217218

218219
static int64_t dump_read_info(uint32_t *dump_id, uint32_t *dump_size, uint32_t *dump_type)

arch/powerpc/platforms/powernv/opal-elog.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -144,11 +144,12 @@ static struct attribute *elog_default_attrs[] = {
144144
&ack_attribute.attr,
145145
NULL,
146146
};
147+
ATTRIBUTE_GROUPS(elog_default);
147148

148149
static struct kobj_type elog_ktype = {
149150
.sysfs_ops = &elog_sysfs_ops,
150151
.release = &elog_release,
151-
.default_attrs = elog_default_attrs,
152+
.default_groups = elog_default_groups,
152153
};
153154

154155
/* Maximum size of a single log on FSP is 16KB */

0 commit comments

Comments
 (0)