]> git.baikalelectronics.ru Git - kernel.git/commitdiff
ia64: topology: use default_groups in kobj_type
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 14 Jan 2022 22:03:22 +0000 (14:03 -0800)
committerLinus Torvalds <torvalds@linux-foundation.org>
Sat, 15 Jan 2022 14:30:24 +0000 (16:30 +0200)
There are currently two ways to create a set of sysfs files for a kobj_type,
through the default_attrs field, and the default_groups field.

Move the ia64 topology sysfs code to use default_groups field which has
been the preferred way since 69dee9413867 ("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://lkml.kernel.org/r/20220104154800.1287947-1-gregkh@linuxfoundation.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: Mike Rapoport <rppt@kernel.org>
Cc: David Hildenbrand <david@redhat.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
arch/ia64/kernel/topology.c

index 3639e0a7cb3b0ee11ac65cd367758482e08908c0..e4992917a24b772e48a4769faea57c68e178576a 100644 (file)
@@ -264,6 +264,7 @@ static struct attribute * cache_default_attrs[] = {
        &shared_cpu_map.attr,
        NULL
 };
+ATTRIBUTE_GROUPS(cache_default);
 
 #define to_object(k) container_of(k, struct cache_info, kobj)
 #define to_attr(a) container_of(a, struct cache_attr, attr)
@@ -284,7 +285,7 @@ static const struct sysfs_ops cache_sysfs_ops = {
 
 static struct kobj_type cache_ktype = {
        .sysfs_ops      = &cache_sysfs_ops,
-       .default_attrs  = cache_default_attrs,
+       .default_groups = cache_default_groups,
 };
 
 static struct kobj_type cache_ktype_percpu_entry = {