Commit f54dfdf7 authored by Greg Kroah-Hartman's avatar Greg Kroah-Hartman
Browse files

firmware: memmap: 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 firmware memmap sysfs code to use default_groups field
which has been the preferred way since aa30f47c ("kobject: Add
support for default attribute groups to kobj_type") so that we can soon
get rid of the obsolete default_attrs field.

Link: https://lore.kernel.org/r/20220105175650.2640758-1-gregkh@linuxfoundation.org


Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 99a6a4b3
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -69,6 +69,7 @@ static struct attribute *def_attrs[] = {
	&memmap_type_attr.attr,
	NULL
};
ATTRIBUTE_GROUPS(def);

static const struct sysfs_ops memmap_attr_ops = {
	.show = memmap_attr_show,
@@ -118,7 +119,7 @@ static void __meminit release_firmware_map_entry(struct kobject *kobj)
static struct kobj_type __refdata memmap_ktype = {
	.release	= release_firmware_map_entry,
	.sysfs_ops	= &memmap_attr_ops,
	.default_attrs	= def_attrs,
	.default_groups	= def_groups,
};

/*