Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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 aa30f47cf666 ("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: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

+2 -1
+2 -1
drivers/firmware/memmap.c
··· 69 69 &memmap_type_attr.attr, 70 70 NULL 71 71 }; 72 + ATTRIBUTE_GROUPS(def); 72 73 73 74 static const struct sysfs_ops memmap_attr_ops = { 74 75 .show = memmap_attr_show, ··· 119 118 static struct kobj_type __refdata memmap_ktype = { 120 119 .release = release_firmware_map_entry, 121 120 .sysfs_ops = &memmap_attr_ops, 122 - .default_attrs = def_attrs, 121 + .default_groups = def_groups, 123 122 }; 124 123 125 124 /*