diff options
author | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2022-01-05 20:56:50 +0300 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2022-01-05 21:17:29 +0300 |
commit | f54dfdf7c625aad722a7d1508f99e8272bc4800c (patch) | |
tree | 9ee8638a62c2c2887fd495c3e4b55a2f359bc1ae /drivers | |
parent | 99a6a4b39575b39c34fc024400b25a52343fbe07 (diff) | |
download | linux-f54dfdf7c625aad722a7d1508f99e8272bc4800c.tar.xz |
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>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/firmware/memmap.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/firmware/memmap.c b/drivers/firmware/memmap.c index 24945e2da77b..8e59be3782cb 100644 --- a/drivers/firmware/memmap.c +++ b/drivers/firmware/memmap.c @@ -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, }; /* |